A rigid body configuration is used for constructions of rigid bodies. An instance of this class can safely be reused, as a rigid body will not have any references to a field of this class.

Constructor

new()

Default constructor.

Variables

angularDamping:Float

The damping coefficient of the angular velocity. Set positive values to gradually reduce the angular velocity.

angularVelocity:Vec3

The initial value of the rigid body's angular velocity.

autoSleep:Bool

Whether to automatically sleep the rigid body when it stops moving for a certain period of time, namely sleepingTimeThreshold.

linearDamping:Float

The damping coefficient of the linear velocity. Set positive values to gradually reduce the linear velocity.

linearVelocity:Vec3

The initial value of the rigid body's linear velocity.

position:Vec3

The world position of the rigid body's center of gravity.

rotation:Mat3

The rotation matrix of the rigid body.

sleepingAngularVelocityThreshold:Float

The angular velocity threshold to sleep the rigid body.

sleepingTimeThreshold:Float

The time threshold to sleep the rigid body.

sleepingVelocityThreshold:Float

The linear velocity threshold to sleep the rigid body.

type:Int

The rigid body's motion type. See RigidBodyType for details.