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
Name | Type | Description |
---|---|---|
mass | Float | Mass of the rigid body. A value of 0 is interpreted as infinite mass. |
centerOfMass | Vec3 | Center of mass. Relative to the entity's transform. |
linearDamping | Float | Linear damping coefficient. Used to slow down the rigid body's linear velocity. Zero represents no damping. Must be non-negative. |
angularDamping | Float | Angular 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. |
force | Vec3 | |
torque | Vec3 | |
collisionDetection | Int32 | The type of collision detection to use for this rigid body. |
useGravity | boolean | Controls whether rigid body is affected by gravity. |
isKinematic | boolean | Specifies if rigid body is kinematic. Kinematic rigid bodies are not affected by forces such as gravity. |