# AddRelativeForce(Vector3, ForceMode)

> Applies a force to the Articulation Body, relative to its local coordinate system.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.5/script-reference/unityengine.md)
* **Assembly:** UnityEngine.PhysicsModule

```csharp
public void AddRelativeForce(Vector3 force, ForceMode mode)
```

### Parameters

**** (\[Vector3]\(/engine/6000.5/script-reference/unityengine/vector3)): The force vector in local coordinates.**** (\[ForceMode]\(/engine/6000.5/script-reference/unityengine/forcemode)): The type of force to apply.

### Remarks

You can only apply a force to an active ArticulationBody. If a GameObject is inactive, AddRelativeForce has no effect.

[ForceMode.Force](/engine/6000.5/script-reference/unityengine/forcemode/force.md) and [ForceMode.Acceleration](/engine/6000.5/script-reference/unityengine/forcemode/acceleration.md) modes modify the Linear Velocity Per Second accumulator and [ForceMode.Impulse](/engine/6000.5/script-reference/unityengine/forcemode/impulse.md) and [ForceMode.VelocityChange](/engine/6000.5/script-reference/unityengine/forcemode/velocitychange.md) modify the Linear Velocity Per Step accumulator. Mixing these 2 groups of ForceModes doesn't work for Articulation Bodies and will result in only the Linear Velocity Per Second accumulator being applied.

For more information on how ForceMode affects velocity, see [Rigidbody.AddForce](/engine/6000.5/script-reference/unityengine/rigidbody/addforce.md).

Applying a force to an ArticulationBody wakes up that body. If the force size is zero then the ArticulationBody does not wake up.

Unit of measurement - N (newtons).

Additional Resources: [ArticulationBody.AddForce](/engine/6000.5/script-reference/unityengine/articulationbody/addforce.md), [ArticulationBody.AddForceAtPosition](/engine/6000.5/script-reference/unityengine/articulationbody/addforceatposition.md), [ArticulationBody.AddRelativeTorque](/engine/6000.5/script-reference/unityengine/articulationbody/addrelativetorque.md).

### Examples

```csharp
using UnityEngine;
using System.Collections;

// Add a thrust force to push an object in its current forward
// direction (to simulate a rocket motor, say).
public class ExampleClass : MonoBehaviour
{
    public float thrust;
    public ArticulationBody ab;
    void Start()
    {
        ab = GetComponent<ArticulationBody>();
    }

    void FixedUpdate()
    {
        ab.AddRelativeForce(Vector3.forward * thrust);
    }
}
```
