Description
The AngularDamping
property of the PhysicsGroup
class is used to set the angular damping on all physics bodies within the group. Angular damping is a measure of how much the rotation of a body is slowed down over time due to forces like air resistance or internal friction. This property directly affects the AngularDamping
of each PhysicsBody
in the group, allowing for consistent rotational behavior across all bodies.
Usage
To use the AngularDamping
property, simply set it to a float
value representing the desired damping factor. A higher value will result in more rapid slowing of rotational motion, while a lower value will allow for more sustained rotation.
Example
// Create a new PhysicsGroup
PhysicsGroup physicsGroup = new PhysicsGroup();
// Set the angular damping for all bodies in the group
physicsGroup.AngularDamping = 0.5f;
// This will apply the angular damping to each PhysicsBody in the group,
// causing them to slow their rotation at the specified rate.