ドキュメント

Unity Engine

Unity Engine

ToPhysicsTransform

Transform a 3D Transform position and rotation to a 2D PhysicsTransform. Scale is not part of a PhysicsTransform therefore it is ignored.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule

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.
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.

Remarks

For a custom transform plane use PhysicsMath.ToPhysicsTransform instead.

ToPhysicsTransform(Transform, PhysicsWorld)

Transform a 3D Transform position and rotation to a 2D PhysicsTransform using the specified world's transform plane. Scale is not part of a PhysicsTransform therefore it is ignored.
public static PhysicsTransform ToPhysicsTransform(Transform transform, PhysicsWorld world)

Parameters

transform

The 3D transform to use.

The world whose transform plane is used.

Returns

Type

Description

PhysicsTransformThe 2D transform.