Skip to main content

RigidBody

ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesposition : Vector3f

Rigid Body Position

Example

rb.position = new APJS.Vector3f(1, 2, 3);
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesrotation : Quaternion

Rigid body rotation angle (quaternion)

Example

rb.rotation = new APJS.Quaternionf(0, 0, 0, 1); // Identity quaternion
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariableseulerAngles : Vector3f

Euler angles of rigid body rotation

Example

rb.eulerAngles = new APJS.Vector3f(0, 45, 0);

ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesvelocity : Vector3f

Rigid body linear velocity

Example

rb.velocity = new APJS.Vector3f(0, 5, 0);
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesangularVelocity : Vector3f

Angular Velocity

Example

rb.angularVelocity = new APJS.Vector3f(0, 0, 10);
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesforce : Vector3f

External force value (external forces acting on the rigid body other than gravity)

Example

rb.force = new APJS.Vector3f(0, 10, 0);
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablestorque : Vector3f

External torque (the external force acting on a rigid body that causes it to rotate)

Example

rb.torque = new APJS.Vector3f(0, 5, 0);
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesmass : number

Rigid Body Mass

Example

rigidbody.mass = 10;
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesinertiaTensor : Vector3f

Moment of Inertia

Example

rb.inertiaTensor = new APJS.Vector3f(1, 1, 1);
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesdamping : number

Damping value, linear motion damping

Example

rb.damping = 0.2;
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesangularDamping : number

Damping value, rotational motion damping

Example

rb.angularDamping = 0.05;
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesstatic : boolean

Whether it is a static rigid body

Example

rb.static = false;
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesfreezeX : boolean

Whether the movement is locked in the x direction.

Example

rb.freezeX = false;
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesfreezeY : boolean

Whether the movement is locked in the y direction.

Example

rb.freezeY = false;
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesfreezeZ : boolean

Whether the movement is locked in the z direction.

Example

rb.freezeZ = false;
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesuseGravity : boolean

Whether it is affected by gravity

Example

rb.useGravity = false;
ClassTypeNameInterface Description
RigidBody Dynamic ComponentVariablesaddForce(force : Vector3f) : void

Add External Force

Example

rb.addForce(new APJS.Vector3f(0, 100, 0));
ClassTypeNameInterface Description
RigidBody Dynamic ComponentFunctionsaddTorque(torque : Vector3f) : void

Add Torque

Example

rb.addTorque(new APJS.Vector3f(0, 0, 20));
Copyright © 2025 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalCookies