# attachedRigidbody

> The Rigidbody2D attached to the Joint2D.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.Physics2DModule

```csharp
public Rigidbody2D attachedRigidbody { get; }
```

### Remarks

[Joint2D](/engine/6000.0/script-reference/unityengine/joint2d.md) are automatically attached to a [Rigidbody2D](/engine/6000.0/script-reference/unityengine/rigidbody2d.md) on the same [GameObject](/engine/6000.0/script-reference/unityengine/gameobject.md) as the [Joint2D](/engine/6000.0/script-reference/unityengine/joint2d.md).

Additional Resources: [Rigidbody2D](/engine/6000.0/script-reference/unityengine/rigidbody2d.md).

### Examples

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

public class ExampleClass : MonoBehaviour
{
    public Vector2 force = Vector2.up;

    void Start()
    {
        // Apply a force to the rigidbody attached to the joint.
        GetComponent<Joint2D>().attachedRigidbody.AddForce(force);
    }
}
```
