Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ToPhysicsTransform(Transform, TransformPlane)

Transform a 3D Transform position and rotation to a 2D PhysicsTransform. Scale is not part of a PhysicsTransform therefore it is ignored. If PhysicsWorld.TransformPlane.Custom is used, PhysicsWorld.TransformPlane.XY will be used instead which may not provide the correct results.
Read time 1 minuteLast updated 13 days ago

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public static PhysicsTransform ToPhysicsTransform(Transform transform, PhysicsWorld.TransformPlane transformPlane = TransformPlane.XY)

Parameters

transform

The 3D transform to use.

transformPlane

The transform plane to use.

Returns

Type

Description

PhysicsTransformThe 2D transform.