ドキュメント

Unity Engine

Unity Engine

ToRotation2D

Transform a 3D rotation into a 2D angle using the selected transform plane. If TransformPlane.Custom is used then PhysicsWorld.TransformPlane.XY is used.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

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

ToRotation2D(Quaternion, TransformPlane)

Transform a 3D rotation into a 2D angle using the selected transform plane. If TransformPlane.Custom is used then PhysicsWorld.TransformPlane.XY is used.
public static float ToRotation2D(Quaternion quaternion, PhysicsWorld.TransformPlane transformPlane = TransformPlane.XY)

Parameters

quaternion

The 3D rotation to transform.

transformPlane

The transform plane to use.

Returns

Type

Description

floatThe transformed rotation in radians.

ToRotation2D(Quaternion, TransformPlane, TransformPlaneCustom)

Transform a 3D rotation into a 2D angle using the selected transform plane.
public static float ToRotation2D(Quaternion rotation, PhysicsWorld.TransformPlane transformPlane, in PhysicsWorld.TransformPlaneCustom transformPlaneCustom)

Parameters

rotation

The 3D rotation to transform.

transformPlane

The transform plane to use.

transformPlaneCustom

Returns

Type

Description

floatThe transformed rotation in radians.