# Transform

> Transform the geometry.

## Definition

* **Type:** Method
* **Namespace:** [Unity.U2D.Physics](/engine/6000.5/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

## Transform(PhysicsTransform)

Transform the geometry.

```csharp
public readonly CapsuleGeometry Transform(PhysicsTransform transform)
```

### Parameters

**** (\[PhysicsTransform]\(/engine/6000.5/script-reference/unity/u2d/physics/physicstransform)): The geometry to transform with.

### Returns

| Type                                                                                    | Description               |
| --------------------------------------------------------------------------------------- | ------------------------- |
| [CapsuleGeometry](/engine/6000.5/script-reference/unity/u2d/physics/capsulegeometry.md) | The transformed geometry. |

## Transform(Matrix4x4, bool)

Transform the geometry. The maximum absolute value component from the scale will be used to scale the [\_radius](/engine/6000.5/script-reference/unity/u2d/physics/capsulegeometry/radius.md).

```csharp
public readonly CapsuleGeometry Transform(Matrix4x4 transform, bool scaleRadius)
```

### Parameters

**** (\[Matrix4x4]\(/engine/6000.5/script-reference/unityengine/matrix4x4)): The transform to be used on the geometry.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to scale the radius of the shape.

### Returns

| Type                                                                                    | Description               |
| --------------------------------------------------------------------------------------- | ------------------------- |
| [CapsuleGeometry](/engine/6000.5/script-reference/unity/u2d/physics/capsulegeometry.md) | The transformed geometry. |

## Transform(Span\<CapsuleGeometry>, PhysicsTransform)

Transform a batch of geometry in place.

```csharp
public static void Transform(Span<CapsuleGeometry> geometry, PhysicsTransform transform)
```

### Parameters

**** (\[Span\<CapsuleGeometry>]\(https\://learn.microsoft.com/dotnet/api/system.span-1)): The geometry to transform in place.**** (\[PhysicsTransform]\(/engine/6000.5/script-reference/unity/u2d/physics/physicstransform)): The transform to apply.

## Transform(Span\<CapsuleGeometry>, Matrix4x4, bool)

Transform a batch of geometry in place. The maximum absolute value component from the scale will be used to scale the [\_radius](/engine/6000.5/script-reference/unity/u2d/physics/capsulegeometry/radius.md).

```csharp
public static void Transform(Span<CapsuleGeometry> geometry, Matrix4x4 transform, bool scaleRadius)
```

### Parameters

**** (\[Span\<CapsuleGeometry>]\(https\://learn.microsoft.com/dotnet/api/system.span-1)): The geometry to transform in place.**** (\[Matrix4x4]\(/engine/6000.5/script-reference/unityengine/matrix4x4)): The transform to apply.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to scale the radius of the shape.
