O'Reilly logo

Learning Game Physics with Bullet Physics and OpenGL by Chris Dickinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Force, torque, and impulse

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.

Note

Continue from here using the Chapter6.3_ForceTorqueAndImpulse project files.

Understanding the object motion

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.

However, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required