Game Development Reference
In-Depth Information
acting on the ball's surface some distance from its center of gravity, it creates a moment
(torque) about the ball's center of gravity, which causes the ball to spin. You can develop
an equation for the new angular velocity of the ball in terms of the normal impact force
or impulse:
Σ M cg = F f r = I cg dω/dt
µ F n r = I cg dω/dt
µ F n r dt = I cg
ȫ (t- to t+) F n dt = I cg / (µ r) ȫ (ω- to ω+) ω dω
Notice here that the integral on the left is the normal impulse; thus:
Impulse = I cg / (µ r) (ω + - ω - )
ω + = (Impulse) (µ r) / I cg + ω -
This relation looks very similar to the angular impulse equation that we showed you
earlier in this chapter, and you can use it to approximate the friction-induced spin in
specific collision problems.
Turn back to the equation for impulse, J , in the last section that includes both linear and
angular effects. Here it is again for convenience:
| J | = -( v r n )(e + 1) / [1/m 1 + 1/m 2 + n •(( r 1 × n )/ I 1 ) × r 1 + n
(( r 2 × n )/ I 2 ) × r 2 ]
This formula gives you the collision impulse in the normal direction. To see how friction
fits in you must keep in mind that friction acts tangentially to the contacting surfaces,
that combining the friction force with the normal impact force yields a new effective
line of action for the collision, and that the friction force (and impulse) is a function of
the normal force (impulse) and coefficient of friction. Considering all these factors, the
new equations to calculate the change in linear and angular velocities of two colliding
objects are as follows:
v 1+ = v 1- + (J n + (µ J) t ) / m 1
v 2+ = v 2- + (-J n + (µ J) t ) / m 2
ω 1+ = ω 1- + ( r 1 × (J n + (µ J) t )) / I cg
ω 2+ = ω 2- + ( r 2 × (-J n + (µ J) t )) / I cg
In these equations, t is the unit tangent vector, which is tangent to the collision surfaces
and at a right angle to the unit normal vector. You can calculate the tangent vector if
you know the unit normal vector and the relative velocity vector in the same plane as
the normal vector.