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:752
Rigid body parameters.
Properties
mass
mass: Float;
Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:757
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:762
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:767
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:772
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:777
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:782
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:787
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:792
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:797
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:802
Specifies if rigid body is kinematic. Kinematic rigid bodies are not affected by forces such as gravity.
Default Value
false;