# Class RigidBodyDesc

- Defined in dynamics/rigid_body.d.ts:510

#####
Index

### Constructors

constructor

### Properties

additionalSolverIterations
angularDamping
angularInertiaLocalFrame
angvel
canSleep
ccdEnabled
centerOfMass
dominanceGroup
enabled
gravityScale
linearDamping
linvel
mass
massOnly
principalAngularInertia
rotation
rotationsEnabledX
rotationsEnabledY
rotationsEnabledZ
sleeping
softCcdPrediction
status
translation
translationsEnabledX
translationsEnabledY
translationsEnabledZ
userData?

### Methods

enabledRotations
enabledTranslations
lockRotations
lockTranslations
restrictRotations
restrictTranslations
setAdditionalMass
setAdditionalMassProperties
setAdditionalSolverIterations
setAngularDamping
setAngvel
setCanSleep
setCcdEnabled
setDominanceGroup
setEnabled
setGravityScale
setLinearDamping
setLinvel
setRotation
setSleeping
setSoftCcdPrediction
setTranslation
setUserData
dynamic
fixed
kinematicPositionBased
kinematicVelocityBased
newDynamic
newKinematicPositionBased
newKinematicVelocityBased
newStatic

## Constructors

### constructor

- new RigidBodyDesc(status): RigidBodyDesc

- #### Parameters

  - status: RigidBodyType

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:538

## Properties

### additionalSolverIterations

additionalSolverIterations: number

- Defined in dynamics/rigid_body.d.ts:536

### angularDamping

angularDamping: number

- Defined in dynamics/rigid_body.d.ts:529

### angularInertiaLocalFrame

angularInertiaLocalFrame: Rotation

- Defined in dynamics/rigid_body.d.ts:523

### angvel

angvel: Vector

- Defined in dynamics/rigid_body.d.ts:521

### canSleep

canSleep: boolean

- Defined in dynamics/rigid_body.d.ts:531

### ccdEnabled

ccdEnabled: boolean

- Defined in dynamics/rigid_body.d.ts:533

### centerOfMass

centerOfMass: Vector

- Defined in dynamics/rigid_body.d.ts:517

### dominanceGroup

dominanceGroup: number

- Defined in dynamics/rigid_body.d.ts:535

### enabled

enabled: boolean

- Defined in dynamics/rigid_body.d.ts:511

### gravityScale

gravityScale: number

- Defined in dynamics/rigid_body.d.ts:514

### linearDamping

linearDamping: number

- Defined in dynamics/rigid_body.d.ts:528

### linvel

linvel: Vector

- Defined in dynamics/rigid_body.d.ts:520

### mass

mass: number

- Defined in dynamics/rigid_body.d.ts:515

### massOnly

massOnly: boolean

- Defined in dynamics/rigid_body.d.ts:516

### principalAngularInertia

principalAngularInertia: Vector

- Defined in dynamics/rigid_body.d.ts:522

### rotation

rotation: Rotation

- Defined in dynamics/rigid_body.d.ts:513

### rotationsEnabledX

rotationsEnabledX: boolean

- Defined in dynamics/rigid_body.d.ts:525

### rotationsEnabledY

rotationsEnabledY: boolean

- Defined in dynamics/rigid_body.d.ts:526

### rotationsEnabledZ

rotationsEnabledZ: boolean

- Defined in dynamics/rigid_body.d.ts:527

### sleeping

sleeping: boolean

- Defined in dynamics/rigid_body.d.ts:532

### softCcdPrediction

softCcdPrediction: number

- Defined in dynamics/rigid_body.d.ts:534

### status

status: RigidBodyType

- Defined in dynamics/rigid_body.d.ts:530

### translation

translation: Vector

- Defined in dynamics/rigid_body.d.ts:512

### translationsEnabledX

translationsEnabledX: boolean

- Defined in dynamics/rigid_body.d.ts:518

### translationsEnabledY

translationsEnabledY: boolean

- Defined in dynamics/rigid_body.d.ts:519

### translationsEnabledZ

translationsEnabledZ: boolean

- Defined in dynamics/rigid_body.d.ts:524

### `Optional` userData

userData?: unknown

- Defined in dynamics/rigid_body.d.ts:537

## Methods

### enabledRotations

- enabledRotations(rotationsEnabledX, rotationsEnabledY, rotationsEnabledZ): RigidBodyDesc

- Allow rotation of this rigid-body only along specific axes.

  #### Parameters

  - rotationsEnabledX: boolean

    Are rotations along the X axis enabled?

  - rotationsEnabledY: boolean

    Are rotations along the y axis enabled?

  - rotationsEnabledZ: boolean

    Are rotations along the Z axis enabled?

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:683

### enabledTranslations

- enabledTranslations(translationsEnabledX, translationsEnabledY, translationsEnabledZ): RigidBodyDesc

- Allow translation of this rigid-body only along specific axes.

  #### Parameters

  - translationsEnabledX: boolean

    Are translations along the X axis enabled?

  - translationsEnabledY: boolean

    Are translations along the y axis enabled?

  - translationsEnabledZ: boolean

    Are translations along the Z axis enabled?

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:663

### lockRotations

- lockRotations(): RigidBodyDesc

- Locks all rotations that would have resulted from forces on the created rigid-body.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:696

### lockTranslations

- lockTranslations(): RigidBodyDesc

- Locks all translations that would have resulted from forces on the created rigid-body.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:676

### restrictRotations

- restrictRotations(rotationsEnabledX, rotationsEnabledY, rotationsEnabledZ): RigidBodyDesc

- Allow rotation of this rigid-body only along specific axes.

  #### Parameters

  - rotationsEnabledX: boolean

    Are rotations along the X axis enabled?

  - rotationsEnabledY: boolean

    Are rotations along the y axis enabled?

  - rotationsEnabledZ: boolean

    Are rotations along the Z axis enabled?

  #### Returns RigidBodyDesc

  #### Deprecated

  use `this.enabledRotations` with the same arguments instead.

  - Defined in dynamics/rigid_body.d.ts:691

### restrictTranslations

- restrictTranslations(translationsEnabledX, translationsEnabledY, translationsEnabledZ): RigidBodyDesc

- Allow translation of this rigid-body only along specific axes.

  #### Parameters

  - translationsEnabledX: boolean

    Are translations along the X axis enabled?

  - translationsEnabledY: boolean

    Are translations along the y axis enabled?

  - translationsEnabledZ: boolean

    Are translations along the Z axis enabled?

  #### Returns RigidBodyDesc

  #### Deprecated

  use `this.enabledTranslations` with the same arguments instead.

  - Defined in dynamics/rigid_body.d.ts:671

### setAdditionalMass

- setAdditionalMass(mass): RigidBodyDesc

- Sets the initial mass of the rigid-body being built, before adding colliders' contributions.

  #### Parameters

  - mass: number

    − The initial mass of the rigid-body to create.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:622

### setAdditionalMassProperties

- setAdditionalMassProperties(mass, centerOfMass, principalAngularInertia, angularInertiaLocalFrame): RigidBodyDesc

- 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.

  #### Parameters

  - mass: number

    − The initial mass of the rigid-body to create.

  - centerOfMass: Vector

    − The initial center-of-mass of the rigid-body to create.

  - principalAngularInertia: Vector

    − The initial principal angular inertia of the rigid-body to create. These are the eigenvalues of the angular inertia matrix.

  - angularInertiaLocalFrame: Rotation

    − The initial local angular inertia frame of the rigid-body to create. These are the eigenvectors of the angular inertia matrix.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:656

### setAdditionalSolverIterations

- setAdditionalSolverIterations(iters): RigidBodyDesc

- 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.

  #### Parameters

  - iters: number

    The new number of additional solver iterations (default: 0).

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:591

### setAngularDamping

- setAngularDamping(damping): RigidBodyDesc

- Sets the angular damping of the rigid-body to create.

  This will progressively slowdown the rotational movement of the rigid-body.

  #### Parameters

  - damping: number

    The angular damping coefficient. Should be >= 0. The higher this value is, the stronger the rotational slowdown will be.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:714

### setAngvel

- setAngvel(vel): RigidBodyDesc

- Sets the initial angular velocity of the rigid-body to create.

  #### Parameters

  - vel: Vector

    The angular velocity to set.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:636

### setCanSleep

- setCanSleep(can): RigidBodyDesc

- Sets whether or not the rigid-body to create can sleep.

  #### Parameters

  - can: boolean

    true if the rigid-body can sleep, false if it can't.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:720

### setCcdEnabled

- setCcdEnabled(enabled): RigidBodyDesc

- Sets whether Continuous Collision Detection (CCD) is enabled for this rigid-body.

  #### Parameters

  - enabled: boolean

    true if the rigid-body has CCD enabled.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:732

### setDominanceGroup

- setDominanceGroup(group): RigidBodyDesc

- #### Parameters

  - group: number

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:579

### setEnabled

- setEnabled(enabled): RigidBodyDesc

- Sets whether the created rigid-body will be enabled or disabled.

  #### Parameters

  - enabled: boolean

    − If set to `false` the rigid-body will be disabled at creation.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:596

### setGravityScale

- setGravityScale(scale): RigidBodyDesc

- Sets the scale factor applied to the gravity affecting the rigid-body being built.

  #### Parameters

  - scale: number

    The scale factor. Set this to `0.0` if the rigid-body needs to ignore gravity.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:616

### setLinearDamping

- setLinearDamping(damping): RigidBodyDesc

- Sets the linear damping of the rigid-body to create.

  This will progressively slowdown the translational movement of the rigid-body.

  #### Parameters

  - damping: number

    The angular damping coefficient. Should be >= 0. The higher this value is, the stronger the translational slowdown will be.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:705

### setLinvel

- setLinvel(x, y, z): RigidBodyDesc

- Sets the initial linear velocity of the rigid-body to create.

  #### Parameters

  - x: number

    The linear velocity to set along the `x` axis.

  - y: number

    The linear velocity to set along the `y` axis.

  - z: number

    The linear velocity to set along the `z` axis.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:630

### setRotation

- setRotation(rot): RigidBodyDesc

- Sets the initial rotation of the rigid-body to create.

  #### Parameters

  - rot: Rotation

    The rotation to set.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:608

### setSleeping

- setSleeping(sleeping): RigidBodyDesc

- Sets whether or not the rigid-body is to be created asleep.

  #### Parameters

  - sleeping: boolean

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:726

### setSoftCcdPrediction

- setSoftCcdPrediction(distance): RigidBodyDesc

- 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.

  #### Parameters

  - distance: number

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:745

### setTranslation

- setTranslation(x, y, z): RigidBodyDesc

- Sets the initial translation of the rigid-body to create.

  #### Parameters

  - x: number
  - y: number
  - z: number

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:602

### setUserData

- setUserData(data?): RigidBodyDesc

- Sets the user-defined object of this rigid-body.

  #### Parameters

  - `Optional` data: unknown

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:751

### `Static` dynamic

- dynamic(): RigidBodyDesc

- A rigid-body descriptor used to build a dynamic rigid-body.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:542

### `Static` fixed

- fixed(): RigidBodyDesc

- A rigid-body descriptor used to build a fixed rigid-body.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:554

### `Static` kinematicPositionBased

- kinematicPositionBased(): RigidBodyDesc

- A rigid-body descriptor used to build a position-based kinematic rigid-body.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:546

### `Static` kinematicVelocityBased

- kinematicVelocityBased(): RigidBodyDesc

- A rigid-body descriptor used to build a velocity-based kinematic rigid-body.

  #### Returns RigidBodyDesc

  - Defined in dynamics/rigid_body.d.ts:550

### `Static` newDynamic

- newDynamic(): RigidBodyDesc

- A rigid-body descriptor used to build a dynamic rigid-body.

  #### Returns RigidBodyDesc

  #### Deprecated

  The method has been renamed to `.dynamic()`.

  - Defined in dynamics/rigid_body.d.ts:560

### `Static` newKinematicPositionBased

- newKinematicPositionBased(): RigidBodyDesc

- A rigid-body descriptor used to build a position-based kinematic rigid-body.

  #### Returns RigidBodyDesc

  #### Deprecated

  The method has been renamed to `.kinematicPositionBased()`.

  - Defined in dynamics/rigid_body.d.ts:566

### `Static` newKinematicVelocityBased

- newKinematicVelocityBased(): RigidBodyDesc

- A rigid-body descriptor used to build a velocity-based kinematic rigid-body.

  #### Returns RigidBodyDesc

  #### Deprecated

  The method has been renamed to `.kinematicVelocityBased()`.

  - Defined in dynamics/rigid_body.d.ts:572

### `Static` newStatic

- newStatic(): RigidBodyDesc

- A rigid-body descriptor used to build a fixed rigid-body.

  #### Returns RigidBodyDesc

  #### Deprecated

  The method has been renamed to `.fixed()`.

  - Defined in dynamics/rigid_body.d.ts:578