float AngularDamping { get; set; }

book_4_sparkGenerated
code_blocksInput

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 quickly the rotation of a body slows down over time due to internal friction or resistance. 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 assign a float value to it. This value will be applied to all physics bodies within the group, affecting their rotational damping. A higher value will result in faster rotational slowdown, 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 an angular damping of 0.5 to each PhysicsBody in the group.