RigidBody
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | position : Vector3f | Rigid Body Position |
Example
rb.position = new APJS.Vector3f(1, 2, 3);
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | rotation : Quaternion | Rigid body rotation angle (quaternion) |
Example
rb.rotation = new APJS.Quaternionf(0, 0, 0, 1); // Identity quaternion
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | eulerAngles : Vector3f | Euler angles of rigid body rotation |
Example
rb.eulerAngles = new APJS.Vector3f(0, 45, 0);
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | velocity : Vector3f | Rigid body linear velocity |
Example
rb.velocity = new APJS.Vector3f(0, 5, 0);
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | angularVelocity : Vector3f | Angular Velocity |
Example
rb.angularVelocity = new APJS.Vector3f(0, 0, 10);
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | force : Vector3f | External force value (external forces acting on the rigid body other than gravity) |
Example
rb.force = new APJS.Vector3f(0, 10, 0);
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | torque : 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);
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | mass : number | Rigid Body Mass |
Example
rigidbody.mass = 10;
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | inertiaTensor : Vector3f | Moment of Inertia |
Example
rb.inertiaTensor = new APJS.Vector3f(1, 1, 1);
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | damping : number | Damping value, linear motion damping |
Example
rb.damping = 0.2;
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | angularDamping : number | Damping value, rotational motion damping |
Example
rb.angularDamping = 0.05;
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | static : boolean | Whether it is a static rigid body |
Example
rb.static = false;
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | freezeX : boolean | Whether the movement is locked in the x direction. |
Example
rb.freezeX = false;
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | freezeY : boolean | Whether the movement is locked in the y direction. |
Example
rb.freezeY = false;
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | freezeZ : boolean | Whether the movement is locked in the z direction. |
Example
rb.freezeZ = false;
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | useGravity : boolean | Whether it is affected by gravity |
Example
rb.useGravity = false;
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Variables | addForce(force : Vector3f) : void | Add External Force |
Example
rb.addForce(new APJS.Vector3f(0, 100, 0));
Class | Type | Name | Interface Description |
---|---|---|---|
RigidBody Dynamic Component | Functions | addTorque(torque : Vector3f) : void | Add Torque |
Example
rb.addTorque(new APJS.Vector3f(0, 0, 20));