Optional
userAre translations along the X axis enabled?
Are translations along the y 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 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?
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.
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.
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 maximum prediction distance Soft Continuous Collision-Detection.
When set to 0, soft-CCD is disabled. Soft-CCD helps prevent tunneling especially of slow-but-thin to moderately fast objects. The soft CCD prediction distance indicates how far in the object’s path the CCD algorithm is allowed to inspect. Large values can impact performance badly by increasing the work needed from the broad-phase.
It is a generally cheaper variant of regular CCD (that can be enabled with
RigidBodyDesc::setCcdEnabled
since it relies on predictive constraints instead of
shape-cast and substeps.
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 translation of this rigid-body only along specific axes.