# ToPhysicsTransform

> Transform a 3D Transform position and rotation to a 2D PhysicsTransform. Scale is not part of a PhysicsTransform therefore it is ignored.

## Definition

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

## ToPhysicsTransform(Transform, TransformPlane)

Transform a 3D [Transform](/engine/6000.7/script-reference/unityengine/transform.md) position and rotation to a 2D [PhysicsTransform](/engine/6000.7/script-reference/unity/u2d/physics/physicstransform.md). Scale is not part of a [PhysicsTransform](/engine/6000.7/script-reference/unity/u2d/physics/physicstransform.md) therefore it is ignored.

```csharp
public static PhysicsTransform ToPhysicsTransform(Transform transform, PhysicsWorld.TransformPlane transformPlane = TransformPlane.XY)
```

### Parameters

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

### Returns

| Type                                                                                      | Description       |
| ----------------------------------------------------------------------------------------- | ----------------- |
| [PhysicsTransform](/engine/6000.7/script-reference/unity/u2d/physics/physicstransform.md) | The 2D transform. |

### Remarks

For a custom transform plane use [PhysicsMath.ToPhysicsTransform](/engine/6000.7/script-reference/unity/u2d/physics/physicsmath/tophysicstransform.md) instead.

## ToPhysicsTransform(Transform, PhysicsWorld)

Transform a 3D [Transform](/engine/6000.7/script-reference/unityengine/transform.md) position and rotation to a 2D [PhysicsTransform](/engine/6000.7/script-reference/unity/u2d/physics/physicstransform.md) using the specified world's transform plane. Scale is not part of a [PhysicsTransform](/engine/6000.7/script-reference/unity/u2d/physics/physicstransform.md) therefore it is ignored.

```csharp
public static PhysicsTransform ToPhysicsTransform(Transform transform, PhysicsWorld world)
```

### Parameters

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

### Returns

| Type                                                                                      | Description       |
| ----------------------------------------------------------------------------------------- | ----------------- |
| [PhysicsTransform](/engine/6000.7/script-reference/unity/u2d/physics/physicstransform.md) | The 2D transform. |
