Skip to main content

RigidBody

type RigidBody = {
mass: Float;
centerOfMass: Vec3;
linearDamping: Float;
angularDamping: Float;
force: Vec3;
torque: Vec3;
collisionDetection: Int32;
useGravity: boolean;
isKinematic: boolean;
};

Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:758

Rigid body parameters.

Type declaration

NameTypeDescription
massFloatMass of the rigid body. A value of 0 is interpreted as infinite mass.
centerOfMassVec3Center of mass. Relative to the entity's transform.
linearDampingFloatLinear damping coefficient. Used to slow down the rigid body's linear velocity. Zero represents no damping. Must be non-negative.
angularDampingFloatAngular damping coefficient. Used to slow down the rigid body's angular velocity, i.e. how much it rotates. Zero represents no damping. Must be non-negative.
forceVec3
torqueVec3
collisionDetectionInt32The type of collision detection to use for this rigid body.
useGravitybooleanControls whether rigid body is affected by gravity.
isKinematicbooleanSpecifies if rigid body is kinematic. Kinematic rigid bodies are not affected by forces such as gravity.