# localToWorldMatrix

> Gets or sets a matrix that transforms the PhysicsShapeGroup2D vertices from local space into world space.

## Definition

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

```csharp
public Matrix4x4 localToWorldMatrix { get; set; }
```

### Remarks

When retrieving a [PhysicsShapeGroup2D](/engine/6000.0/script-reference/unityengine/physicsshapegroup2d.md) via [Rigidbody2D.GetShapes](/engine/6000.0/script-reference/unityengine/rigidbody2d/getshapes.md) or [Collider2D.GetShapes](/engine/6000.0/script-reference/unityengine/collider2d/getshapes.md), this matrix will be set to the pose of the [Rigidbody2D](/engine/6000.0/script-reference/unityengine/rigidbody2d.md) unless a [Rigidbody2D](/engine/6000.0/script-reference/unityengine/rigidbody2d.md) is not available in which case the matrix it set to [Matrix4x4.identity](/engine/6000.0/script-reference/unityengine/matrix4x4/identity.md).
