Rigidbodywrapper

RigidBodyWrapper class

Signature:

export declare class RigidBodyWrapper 

Constructors

ConstructorModifiersDescription
(constructor)(engine, _component, _opts)Constructs a new instance of the RigidBodyWrapper class

Properties

PropertyModifiersTypeDescription
collidersreadonlyCollider[]
componentreadonlyComponent3DReturns the component that owns this rigidbody
enabledbooleanIs this rigidbody enabled?
isDynamicreadonlybooleanIs this rigidbody a dynamic rigidbody?
isFixedreadonlybooleanIs this rigidbody a fixed rigidbody?
isKinematicreadonlybooleanIs this rigidbody a kinematic rigidbody?
optionsreadonlyRigidBodyOptsReturns the options used to create this rigidbody
positionVector3
quaternionQuaternion
rawreadonlyRapierRigidBodyReturns the raw Rapier rigidbody
rotationLock[boolean, boolean, boolean]Returns the current rotation lock state
translationLock[boolean, boolean, boolean]Returns the current translation lock state

Methods

MethodModifiersDescription
__updateActiveEvents()
addCollider(collider)
addForce(force, relativePoint)Add a force to the rigidbody. The force is applied at the center of mass by default unless a relative point is provided
addTorque(torque)Add a torque to the rigidbody
applyImpulse(impulse, relativePoint)Apply an impulse to the rigidbody. The impulse is applied at the center of mass by default unless a relative point is provided
dispose()
removeCollider(collider)
resetForces()Reset all forces applied to the rigidbody to zero
resetTorques()Reset all torques applied to the rigidbody to zero
teleport(position, quaternion)