Type Alias: RigidBody
type RigidBody = {
mass: Float;
centerOfMass: Vec3;
linearDamping: Float;
angularDamping: Float;
maxLinearVelocity: Float;
maxAngularVelocity: Float;
collisionDetection: UInt8;
lockedAxis: UInt8;
useGravity: boolean;
isKinematic: boolean;
};
Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:743
Rigid body parameters.
Properties
mass
mass: Float;
Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:748
Mass of the rigid body. A value of 0 is interpreted as infinite mass.
Default Value
1;
centerOfMass
centerOfMass: Vec3;
Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:753
Center of mass. Relative to the entity's transform.
Default Value
(0, 0, 0);
linearDamping
linearDamping: Float;
Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:758
Linear damping coefficient. Used to slow down the rigid body's linear velocity. Zero represents no damping. Must be non-negative.
Default Value
0;
angularDamping
angularDamping: Float;
Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:763
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.
Default Value
0.05;
maxLinearVelocity
maxLinearVelocity: Float;
Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:768
The maximum linear velocity permitted for this body in m/s. Must be non-negative.
Default Value
10000000000000000;
maxAngularVelocity
maxAngularVelocity: Float;
Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:773
The maximum angular velocity permitted for this body in rad/s. Must be non-negative.
Default Value
100;
collisionDetection
collisionDetection: UInt8;
Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:778
The type of collision detection to use for this rigid body.
Default Value
0;
lockedAxis
lockedAxis: UInt8;
Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:783
Lock motion along/around the specified axis.
Default Value
0;
useGravity
useGravity: boolean;
Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:788
Controls whether rigid body is affected by gravity.
Default Value
true;
isKinematic
isKinematic: boolean;
Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:793
Specifies if rigid body is kinematic. Kinematic rigid bodies are not affected by forces such as gravity.
Default Value
false;