Next, we will explore how to manipulate the motion of our collision objects through forces, torques, and impulses and also discuss the important differences between them.
Continue from here using the
Chapter6.3_ForceTorqueAndImpulse project files.
We have already observed one method of moving a rigid body with our
ShootBox() command back in Chapter 5, Raycasting and Constraints, by calling the
setLinearVelocity() function on the object's rigid body after creating it. This function sets the magnitude and direction of the object's linear motion. Meanwhile, another commonly used motion altering command is
setAngularVelocity(), which is used to set the object's rotational velocity.