float LinearDamping { get; set; }

robot_2Generated
code_blocksInput

Description

The LinearDamping property of the Rigidbody class represents the linear damping factor applied to the rigidbody. Linear damping is a force that opposes the motion of the rigidbody, effectively reducing its velocity over time. This property is useful for simulating effects like air resistance or friction that gradually slow down the object.

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 rigidbody's linear motion.

Example usage:

Rigidbody myRigidbody = new Rigidbody();
myRigidbody.LinearDamping = 0.5f; // Sets the linear damping to 0.5

Example

Rigidbody myRigidbody = new Rigidbody();
myRigidbody.LinearDamping = 0.5f; // Sets the linear damping to 0.5