Description
The AngularDrag
property of the PhysicsBody
class specifies the amount of air drag applied to the angular movement or rotation of the physics body. The default value is 1. This property considers the object's rotation and surface area in the direction of rotation, unlike AngularDamping
, which is a more generic damping factor.
Adjusting the AngularDrag
can affect how quickly a rotating object slows down due to air resistance. This property is particularly useful in simulating realistic rotational deceleration in environments where air density and drag are factors.
For more information, see PhysicsWorld.AirDensity
and DragEnabled
.
Usage
To use the AngularDrag
property, you can get or set its value on a PhysicsBody
instance. This property is a float
and can be adjusted to simulate different levels of air resistance on the angular movement of the physics body.
Example usage:
PhysicsBody body = new PhysicsBody();
body.AngularDrag = 2.0f; // Sets the angular drag to 2, increasing the rotational resistance.
float currentDrag = body.AngularDrag; // Retrieves the current angular drag value.
Example
PhysicsBody body = new PhysicsBody();
body.AngularDrag = 2.0f; // Sets the angular drag to 2, increasing the rotational resistance.
float currentDrag = body.AngularDrag; // Retrieves the current angular drag value.