Optional
userAre rotations along the X axis enabled?
Are rotations along the y axis enabled?
Are rotations along the Z axis enabled?
Allow translation of this rigid-body only along specific axes.
Are translations along the X axis enabled?
Are translations along the y axis enabled?
Are translations along the Z axis enabled?
Locks all rotations that would have resulted from forces on the created rigid-body.
Locks all translations that would have resulted from forces on the created rigid-body.
Allow rotation of this rigid-body only along specific axes.
use this.enabledRotations
with the same arguments instead.
Are rotations along the X axis enabled?
Are rotations along the y axis enabled?
Are rotations along the Z axis enabled?
Allow translation of this rigid-body only along specific axes.
use this.enabledTranslations
with the same arguments instead.
Are translations along the X axis enabled?
Are translations along the y axis enabled?
Are translations along the Z axis enabled?
Sets the initial mass of the rigid-body being built, before adding colliders' contributions.
− The initial mass of the rigid-body to create.
Sets the mass properties of the rigid-body being built.
Note that the final mass properties of the rigid-bodies depends on the initial mass-properties of the rigid-body (set by this method) to which is added the contributions of all the colliders with non-zero density attached to this rigid-body.
Therefore, if you want your provided mass properties to be the final mass properties of your rigid-body, don't attach colliders to it, or only attach colliders with densities equal to zero.
− The initial mass of the rigid-body to create.
− The initial center-of-mass of the rigid-body to create.
− The initial principal angular inertia of the rigid-body to create. These are the eigenvalues of the angular inertia matrix.
− The initial local angular inertia frame of the rigid-body to create. These are the eigenvectors of the angular inertia matrix.
Sets the number of additional solver iterations that will be run for this rigid-body and everything that interacts with it directly or indirectly through contacts or joints.
Compared to increasing the global World.numSolverIteration
, setting this
value lets you increase accuracy on only a subset of the scene, resulting in reduced
performance loss.
The new number of additional solver iterations (default: 0).
Sets the angular damping of the rigid-body to create.
This will progressively slowdown the rotational movement of the rigid-body.
The angular damping coefficient. Should be >= 0. The higher this value is, the stronger the rotational slowdown will be.
Sets the initial angular velocity of the rigid-body to create.
The angular velocity to set.
Sets whether or not the rigid-body to create can sleep.
true if the rigid-body can sleep, false if it can't.
Sets whether Continuous Collision Detection (CCD) is enabled for this rigid-body.
true if the rigid-body has CCD enabled.
Sets whether the created rigid-body will be enabled or disabled.
− If set to false
the rigid-body will be disabled at creation.
Sets the scale factor applied to the gravity affecting the rigid-body being built.
The scale factor. Set this to 0.0
if the rigid-body
needs to ignore gravity.
Sets the linear damping of the rigid-body to create.
This will progressively slowdown the translational movement of the rigid-body.
The angular damping coefficient. Should be >= 0. The higher this value is, the stronger the translational slowdown will be.
Sets the initial linear velocity of the rigid-body to create.
The linear velocity to set along the x
axis.
The linear velocity to set along the y
axis.
The linear velocity to set along the z
axis.
Sets the initial rotation of the rigid-body to create.
The rotation to set.
Sets whether or not the rigid-body is to be created asleep.
Sets the initial translation of the rigid-body to create.
Sets the user-defined object of this rigid-body.
Optional
data: unknownStatic
dynamicA rigid-body descriptor used to build a dynamic rigid-body.
Static
fixedA rigid-body descriptor used to build a fixed rigid-body.
Static
kinematicA rigid-body descriptor used to build a position-based kinematic rigid-body.
Static
kinematicA rigid-body descriptor used to build a velocity-based kinematic rigid-body.
Static
newA rigid-body descriptor used to build a dynamic rigid-body.
The method has been renamed to .dynamic()
.
Static
newA rigid-body descriptor used to build a position-based kinematic rigid-body.
The method has been renamed to .kinematicPositionBased()
.
Static
newA rigid-body descriptor used to build a velocity-based kinematic rigid-body.
The method has been renamed to .kinematicVelocityBased()
.
Static
newA rigid-body descriptor used to build a fixed rigid-body.
The method has been renamed to .fixed()
.
Generated using TypeDoc
Allow rotation of this rigid-body only along specific axes.