Description
Clears the accumulated torque (angular force) that has been applied to the PhysicsBody
during the current physics frame but has not yet been processed. This method is useful for resetting the angular forces acting on the body, ensuring that any previously applied torques do not affect the body's motion in the next frame.
Usage
Use this method when you need to reset the angular forces on a PhysicsBody
to ensure that no residual torque affects its motion in subsequent frames. This can be particularly useful in scenarios where you want to stop the rotation of a body or when recalibrating forces applied to it.
Example
// Example of using ClearTorque
PhysicsBody myPhysicsBody = new PhysicsBody();
// Apply some torque to the body
myPhysicsBody.ApplyTorque(new Vector3(10, 0, 0));
// Clear the torque before the next physics update
myPhysicsBody.ClearTorque();