# ToPosition2D

> Transform a 3D position into a 2D position using the selected transform plane. This can also be used for a 3D scale vector as it undergoes the same transformation.

## Definition

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

## ToPosition2D(Vector3, TransformPlane, TransformPlaneCustom)

Transform a 3D position into a 2D position using the selected transform plane. This can also be used for a 3D scale vector as it undergoes the same transformation.

```csharp
public static Vector2 ToPosition2D(Vector3 position, PhysicsWorld.TransformPlane transformPlane, in PhysicsWorld.TransformPlaneCustom transformPlaneCustom)
```

### Parameters

**** (\[Vector3]\(/engine/6000.7/script-reference/unityengine/vector3)): The 3D position to transform.**** (\[TransformPlane]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/transformplane)): The transform plane to use.**** (\[TransformPlaneCustom]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/transformplanecustom)): The custom transform plane (if required).

### Returns

| Type                                                              | Description               |
| ----------------------------------------------------------------- | ------------------------- |
| [Vector2](/engine/6000.7/script-reference/unityengine/vector2.md) | The transformed position. |

## ToPosition2D(Vector3, TransformPlane)

Transform a 3D position into a 2D position using the selected transform plane. If TransformPlane.Custom is used then [PhysicsWorld.TransformPlane.XY](/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/transformplane/xy.md) is used.

```csharp
public static Vector2 ToPosition2D(Vector3 position, PhysicsWorld.TransformPlane transformPlane = TransformPlane.XY)
```

### Parameters

**** (\[Vector3]\(/engine/6000.7/script-reference/unityengine/vector3)): The 3D position to transform.**** (\[TransformPlane]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/transformplane)): The transform plane to use.

### Returns

| Type                                                              | Description               |
| ----------------------------------------------------------------- | ------------------------- |
| [Vector2](/engine/6000.7/script-reference/unityengine/vector2.md) | The transformed position. |

## ToPosition2D(Vector3, PhysicsWorld)

Transform a 3D position into a 2D position using the specified world's transform plane.

```csharp
public static Vector2 ToPosition2D(Vector3 position, PhysicsWorld world)
```

### Parameters

**** (\[Vector3]\(/engine/6000.7/script-reference/unityengine/vector3)): The 3D position to transform.**** (\[PhysicsWorld]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsworld)): The world whose transform plane is used.

### Returns

| Type                                                              | Description               |
| ----------------------------------------------------------------- | ------------------------- |
| [Vector2](/engine/6000.7/script-reference/unityengine/vector2.md) | The transformed position. |

## ToPosition2D(Transform, PhysicsWorld)

Transform a Transform's world position into a 2D position using the specified world's transform plane.

```csharp
public static Vector2 ToPosition2D(Transform transform, PhysicsWorld world)
```

### Parameters

**** (\[Transform]\(/engine/6000.7/script-reference/unityengine/transform)): The Transform whose world position is transformed.**** (\[PhysicsWorld]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsworld)): The world whose transform plane is used.

### Returns

| Type                                                              | Description               |
| ----------------------------------------------------------------- | ------------------------- |
| [Vector2](/engine/6000.7/script-reference/unityengine/vector2.md) | The transformed position. |
