Hey,
I have a particle that is hit with a force F at a particular position on the ball P. How can I calculate the angular velocity of the X,Y and Z axis? The actual rotating of the object should be fine, but it's the values of the angular velocity (Vector3) that I'm not sure of. Sorry I can't show any code, but I'm not really sure where to start. Thanks for any help.
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
|
|||
|
|
|
I assume you're already calculating the linear momentum change from the collision so I won't cover that. Essentially, angular momentum works in the same way as linear but with Force replaced by Torque and Mass replaced by Inertia. dv = T / I where dv is the change in angular velocity, T is the torque from the collision and I is the moment of inertia which for a sphere is I = (2/5)MR^2 (solid sphere) I = (2/3)MR^2 (shell) where M is the mass of the sphere and R is the radius. The torque, T, is calculated from the cross product of the force with the vector from the collision point to the center of the sphere: T = F x (P - O) where O is the center of the sphere. Putting it all together: dv = (F x (P - O)) / ((2/5)MR^2) |
|||||||
|