# connectedBody

> The Rigidbody2D object to which the other end of the joint is attached (ie, the object without the joint component).

## Definition

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

```csharp
public Rigidbody2D connectedBody { get; set; }
```

### Remarks

If this property is set to null then the joint attaches to a fixed point in space rather than another Rigidbody2D.

Unity does not support connecting a joint to a [Rigidbody2D](/engine/6000.0/script-reference/unityengine/rigidbody2d.md) in a different [Scene](/engine/6000.0/script-reference/unityengine/scenemanagement/scene.md) that is using a local physics Scene. If a joint is connected to a [Rigidbody2D](/engine/6000.0/script-reference/unityengine/rigidbody2d.md), and then that [Rigidbody2D](/engine/6000.0/script-reference/unityengine/rigidbody2d.md) is moved to a [Scene](/engine/6000.0/script-reference/unityengine/scenemanagement/scene.md) that uses [LocalPhysicsMode.Physics2D](/engine/6000.0/script-reference/unityengine/scenemanagement/localphysicsmode/physics2d.md), then the joint is automatically disconnected from the [Rigidbody2D](/engine/6000.0/script-reference/unityengine/rigidbody2d.md).

Additional Resources: [Scene](/engine/6000.0/script-reference/unityeditor/searchservice/scene.md), [LocalPhysicsMode](/engine/6000.0/script-reference/unityengine/scenemanagement/localphysicsmode.md), [Rigidbody2D](/engine/6000.0/script-reference/unityengine/rigidbody2d.md) and [Joint2D.collideConnected](/engine/6000.0/script-reference/unityengine/joint2d/collideconnected.md).
