ToRotationFast3D(float, TransformPlane)
Transform a 2D angle into a 3D rotation using the selected transform plane (Fast). The transformation is fast because the rotation is simplified by the fact that only a single axis of rotation is handled. All other axis rotations are reset to zero. 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 8 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public static Quaternion ToRotationFast3D(float angle, PhysicsWorld.TransformPlane transformPlane = TransformPlane.XY)
Parameters
The 2D angle to transform in radians.
The transform plane to use.
Returns
Type | Description |
|---|---|
| Quaternion | The transformed rotation. |