Linear Impulse
In this section, we will explore resolving collisions using Impulses. Remember that an impulse is an instantaneous change in velocity. When two objects intersect, we will find the collision manifold between the objects and use this manifold to figure out what impulse will resolve the collision:
We will build our impulse-based collision resolution in two parts. These two parts are linear and angular impulse resolution. In this section, we will resolve linear impulses. This means that objects will not rotate; they will fall, stop falling, and rest on each other. In a later section of this chapter, we will add a rotational impulse to make our physics simulation more realistic.
Getting ready
In this section, we will implement two functions: FindCollisionFeatures
and ApplyImpulse
. The FindCollisionFeatures
function will return the collision manifold between two RigidbodyVolume
objects, and the ApplyImpulse
function will use this manifold to apply an impulse to two colliding objects...