# RigidBody

## Joint nodes

See [joint](https://docs.engagevr.io/developer/afx/node-dictionary/unity/physics/rigidbody/joint "mention").

## Add Force

Adds a force to a Rigidbody. For more information, refer to the [Rigidbody.AddForce](https://docs.unity3d.com/2021.3/Documentation/ScriptReference/Rigidbody.AddForce.html) page in the Unity documentation.

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td>Flow</td><td>Flow to activate the node.</td></tr><tr><td>Rigidbody In</td><td>Rigidbody</td><td>Reference to the Rigidbody.</td></tr><tr><td>World Space</td><td>Boolean [editable]</td><td>If true, the force direction is applied in world space. If false, the force direction is applied in local space.</td></tr><tr><td>Force In</td><td>Vector3 [editable]</td><td>The force to apply.</td></tr></tbody></table>

**Parameters:**

<table><thead><tr><th width="160">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Force Mode</td><td>List [editable]</td><td>Specify how to apply a force. Choose between Force, Impulse, Velocity Change, and Acceleration. For more information, refer to <a href="https://docs.unity3d.com/2021.3/Documentation/ScriptReference/ForceMode.html">Force Mode</a>.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="160">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Exit</td><td>Flow</td><td>Continue the activating flow.</td></tr></tbody></table>

## Add Force at Position

Applies a force at a position. For more information, refer to the [Rigidbody.AddForceAtPosition](https://docs.unity3d.com/2021.3/Documentation/ScriptReference/Rigidbody.AddForceAtPosition.html) page in the Unity documentation.

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td>Flow</td><td>Flow to activate the node.</td></tr><tr><td>Rigidbody In</td><td>Rigidbody</td><td>Reference to the Rigidbody.</td></tr><tr><td>Force</td><td>Vector3 [editable]</td><td>Force vector.</td></tr><tr><td>Pos</td><td>Vector3 [editable]</td><td>The position at which to apply the force.</td></tr></tbody></table>

**Parameters:**

<table><thead><tr><th width="160">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Force Mode</td><td>List [editable]</td><td>Specify how to apply a force. Choose between Force, Impulse, Velocity Change, and Acceleration. For more information, refer to <a href="https://docs.unity3d.com/2021.3/Documentation/ScriptReference/ForceMode.html">Force Mode</a>.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="160">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Exit</td><td>Flow</td><td>Continue the activating flow.</td></tr></tbody></table>

## Add Torque

Adds a torque to the rigidbody. For more information, refer to the [Rigidbody.AddTorque](https://docs.unity3d.com/2021.3/Documentation/ScriptReference/Rigidbody.AddTorque.html) page in the Unity documentation.

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td>Flow</td><td>Flow to activate the node.</td></tr><tr><td>Rigidbody In</td><td>Rigidbody</td><td>Reference to the Rigidbody.</td></tr><tr><td>World Space</td><td>Boolean [editable]</td><td>If true, the force direction is applied in world space. If false, the force direction is applied in local space.</td></tr><tr><td>Force In</td><td>Vector3 [editable]</td><td>The force to apply.</td></tr></tbody></table>

**Parameters:**

<table><thead><tr><th width="160">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Force Mode</td><td>List [editable]</td><td>Specify how to apply a force. Choose between Force, Impulse, Velocity Change, and Acceleration. For more information, refer to <a href="https://docs.unity3d.com/2021.3/Documentation/ScriptReference/ForceMode.html">Force Mode</a>.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="160">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Exit</td><td>Flow</td><td>Continue the activating flow.</td></tr></tbody></table>

## Rigidbody Info

Access information about a Rigidbody. For more information, refer to the [Rigidbody](https://docs.unity3d.com/2021.3/Documentation/ScriptReference/Rigidbody.html) page in the Unity documentation.

**Inputs:**

<table><thead><tr><th width="201">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Rigidbody In</td><td>Rigidbody</td><td>Reference to the Rigidbody.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="200">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Use Gravity Out</td><td>Boolean</td><td>Controls whether gravity affects this Rigidbody.</td></tr><tr><td>Is Kinematic Out</td><td>Boolean</td><td>Controls whether physics affects the Rigidbody.</td></tr><tr><td>Freeze Rotation Out</td><td>Boolean</td><td>Controls whether physics will change the rotation of the object.</td></tr><tr><td>Is Sleeping Out</td><td>Boolean</td><td>Is the Rigidbody sleeping?</td></tr><tr><td>Mass Out</td><td>Float</td><td>The mass of the Rigidbody.</td></tr><tr><td>Drag Out</td><td>Float</td><td>The drag of the object.</td></tr><tr><td>Angular Drag Out</td><td>Float</td><td>The angular drag of the object.</td></tr><tr><td>Center of Mass Out</td><td>Vector3</td><td>The center of mass relative to the transform's origin.</td></tr><tr><td>World Center of Mass Out</td><td>Vector3</td><td>The center of mass of the Rigidbody in world space.</td></tr><tr><td>Position Out</td><td>Vector3</td><td>The position of the Rigidbody.</td></tr><tr><td>Rotation Out</td><td>Quaternion</td><td>The rotation of the Rigidbody.</td></tr><tr><td>Velocity Out</td><td>Vector3</td><td>The velocity vector of the Rigidbody.</td></tr><tr><td>Angular Velocity Out</td><td>Vector3</td><td>The angular velocity vector of the Rigidbody measured in radians per second.</td></tr><tr><td>Speed</td><td>Float</td><td>The speed of the Rigidbody.</td></tr></tbody></table>

## Set value nodes

There are multiple nodes that you can use to set properties of an Rigidbody. For more information, refer to the [Rigidbody](https://docs.unity3d.com/2021.3/Documentation/ScriptReference/Rigidbody.html) page in the Unity documentation.

The set nodes for Rigidbody have a similar arrangement of inputs and outputs, as described in the following sections.

<figure><img src="https://2640392766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yxYHsXtlAaoMUrDWhLm%2Fuploads%2Fgit-blob-dfffebd00812c0fb75510279c494b9236eddcb06%2Fafx_node_rigidbody_setmove.png?alt=media" alt=""><figcaption><p>Example set node for a Rigidbody - the Set MovePosition node</p></figcaption></figure>

**Inputs:**

<table><thead><tr><th width="176">Name</th><th width="169">Type</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td>Flow</td><td>Flow to activate the node.</td></tr><tr><td>Rigidbody In</td><td>Rigidbody</td><td>Reference to a Rigidbody.</td></tr><tr><td>&#x3C;property></td><td>&#x3C;varies> [editable]</td><td>The value to set for the chosen property.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="175">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Exit</td><td>Flow</td><td>Continue the activating flow.</td></tr></tbody></table>

**Available nodes:**

<table><thead><tr><th width="179">Name</th><th width="178">Input type</th><th>Description</th></tr></thead><tbody><tr><td>Set Move Position</td><td>Vector3 [editable]</td><td>Moves the kinematic Rigidbody towards position.</td></tr><tr><td>Move Rotation</td><td>Quaternion</td><td>Rotates the rigidbody to rotation.</td></tr><tr><td>Set Angular Drag</td><td>Float [editable]</td><td>Sets the angular drag.</td></tr><tr><td>Set Angular Velocity</td><td>Vector3 [editable]</td><td>Sets the angular velocity, measured in radians per second.</td></tr><tr><td>Set Center of Mass</td><td>Vector3 [editable]</td><td>Sets the center of mass.</td></tr><tr><td>Set Drag</td><td>Float [editable]</td><td>Sets the drag.</td></tr><tr><td>Set Freeze</td><td>[Paramter List]</td><td>Choose to freeze all, none, position, a specific position axis, rotation, or a specific rotation axis.</td></tr><tr><td>Set Kinematic</td><td>Boolean [editable]</td><td>Set whether physics affect the Rigidbody.</td></tr><tr><td>Set Mass</td><td>Float [editable]</td><td>Sets the mass of the Rigidbody.</td></tr><tr><td>Set Gravity</td><td>Boolean [editable]</td><td>Sets whether the Rigidbody is affected by gravity.</td></tr><tr><td>Set Velocity</td><td>Vector3 [editable]</td><td>Sets the velocity of the Rigidbody.</td></tr></tbody></table>
