Game Development Reference
In-Depth Information
known as penalty methods , at your disposal. 1 In penalty methods, the force at impact is
represented by a temporary spring that gets compressed between the objects at the point
of impact. This spring compresses over a very short time and applies equal and opposite
forces to the colliding bodies to simulate collision response. Proponents of this method
say it has the advantage of ease of implementation. However, one of the difficulties
encountered in its implementation is numerical instability. There are other arguments
for and against the use of penalty methods, but we won't get into the debate here. Instead,
we've included several references in the Bibliography for you to review if you are so
inclined. Other methods of modeling collisions exist as well. For example, nonlinear
finite element simulations are commonly used to model collisions during product de‐
sign, such as the impact of a cellphone with the ground. These methods can be quite
accurate; however, they are too slow for real-time applications. Further, they are overkill
for games.
Impulse-Momentum Principle
Impulse is defined as a force that acts over a very short period of time. For example, the
force exerted on a bullet when fired from a gun is an impulse force. The collision forces
between two colliding objects are impulse forces, as when you kick a football or hit a
baseball with a bat.
More specifically, impulse is a vector quantity equal to the change in momentum. The
so-called impulse-momentum principle says that the change in moment is equal to the
applied impulse. For problems involving constant mass and moment of inertia, you can
write:
Linear impulse = ȫ (t- to t+) F dt = m ( v + - v - )
Angular impulse = ȫ (t- to t+) M dt = I ( ω + - ω - )
In these equations, F is the impulsive force, M is the impulsive torque (or moment), t
is time, v is velocity, the subscript - refers to the instant just prior to impact, and the
subscript + refers to the instant just after impact. You can calculate the average impulse
force and torque using the following equations:
F = m ( v + - v - ) / (t + - t - )
M = I ( ω + - ω - ) / (t + - t - )
1. We use the classical approach in this topic and are mentioning penalty methods only to let you know that the
method we're going to show is not the only one. Roughly speaking, the penalty in penalty methods refers to
the numerical spring constants, which are usually large, that are used to represent the stiffness of the springs
and thus the hardness (or softness) of the colliding bodies. These constants are used in the system of equations
of motion describing the motion of all the bodies under consideration before and after the collision.
Search Nedrilad ::




Custom Search