
410 Chapter 15 Resting Contacts and Friction
impulseContact.x = deltaVelocity.data[0] +
deltaVelocity.data[1]*friction*impulseContact.y +
deltaVelocity.data[2]*friction*impulseContact.z;
impulseContact.x = desiredDeltaVelocity / impulseContact.x;
impulseContact.y *= friction * impulseContact.x;
impulseContact.z *= friction * impulseContact.x;
}
return impulseContact;
}
The impulse is then applied in exactl y the same way as for the nonfriction case.
15.5 Friction and Sequential Contact
Resolution
With the modifications in this chapter, our physics engine has taken a huge leap
forward. It is now capable of modeling rigid bodies with all kinds of contacts