Description
The ClearTorque
method is used to clear any accumulated torque (angular force) that has been applied to a PhysicsBody
during the current physics frame but has not yet been processed. This is useful for resetting the angular forces on a physics body, ensuring that any unintended or residual torque does not affect the body's motion in subsequent frames.
Usage
Call this method on a PhysicsBody
instance when you need to reset the accumulated torque. This is typically done when you want to ensure that no residual angular forces affect the physics body's behavior in the next frame.
Example
// Example of using ClearTorque
PhysicsBody myPhysicsBody = new PhysicsBody();
// Apply some torque
myPhysicsBody.ApplyTorque(new Vector3(10, 0, 0));
// Clear the torque before the next physics update
myPhysicsBody.ClearTorque();