Original Post
I am reading the book "Physics for Game Developers" and I am trying to implement linear and angular impulse response to a collision. Unfortunately I dont seem to understand the equation supplied in the book. I looked online but it only solved part of my problem. The book gives the following equation:
J = -vr ( e+1 ) / {1/m1 + 1/m2 + n . [(r1 x n / I1] x r1 + n . [(r2 x n / I2] x r2}
and then...
v1+ = v1- + (Jn) / m1
v2+ = v2- + (-Jn) / m2
w1+ = w1- + (r1 x Jn) / Icg
w2+ = w2- + (r2 x -Jn) / Icg
Where...
v1- and v2- are the velocity of object 1 and 2 before the collision.
v1+ and v2+ are the velocities after the collision.
Same for w1 and w2 except they are for angular velocities.
Now my questions are...
I1 and I2 are the Inertia Tensors for objects 1 and 2. But do I get their equation depending on what type of object I have ? (rectrangle, sphere, torus, etc...) ?
What is Icg ? I found the same equation on line but it was missing Icg. What is this value ? Is it always 1 ?
What is n ? The book claims its a unit vector along the line of action at the impact point pointing out from body l. Except there is no body l (thats L) and the line they draw is not perpendicular to either body. On the web it says n is the normal to the surface of contact. How do I calculate it ? Do I simply add the normals of all the faces at the collision point ?
Well thats it for now. Thanks in advance to whomever can help or at least point me in the right direction.
Nitzan
-------------------------
www.geocities.com/nitzanw
www.scorchedearth3d.net
-------------------------