float LinearDamping { get; set; }

robot_2Generated
code_blocksInput

Description

The LinearDamping property of the PhysicsGroup class is used to set the linear damping on all physics bodies within the group. Linear damping is a factor that reduces the linear velocity of a body over time, simulating the effect of drag or friction in a medium like air or water. This property directly affects the LinearDamping of each PhysicsBody in the group, allowing for consistent behavior across all bodies.

Usage

To use the LinearDamping property, simply set it to a float value representing the desired damping factor. A higher value will result in more rapid deceleration of the bodies' linear motion.

Example usage:

PhysicsGroup myPhysicsGroup = new PhysicsGroup();
myPhysicsGroup.LinearDamping = 0.5f; // Sets the linear damping to 0.5 for all bodies in the group

Example

PhysicsGroup myPhysicsGroup = new PhysicsGroup();
myPhysicsGroup.LinearDamping = 0.5f; // Sets the linear damping to 0.5 for all bodies in the group