A rigid body is a physical body having definite mass and a fixed shape. One important property of a rigid body is that it always retains its original shape when we apply external force to it. This property greatly simplifies the physics-related calculations performed on a body (actor), assuming that it follows the properties of a perfect rigid body. A rigid body can also be made of multiple interconnected rigid bodies, and can have properties, such as velocity, force, torque, center of gravity, angular motion, and others. In this chapter we will learn methods and parameters for changing the properties of rigid body dynamics.
Mass is one of the essential properties of a rigid body; other properties, such as moment of inertia and momentum also depend on it. In PhysX the easiest way to set the mass of a rigid body is by calling PxRigidBody::setMass()
, which requires a single parameter of type PxReal
, which represents the mass. The function PxRigidBody::getMass()
...