GetRelativeMatrix2D(in Matrix4x4, in Matrix4x4, TransformPlane, in TransformPlaneCustom, bool)
Get the relative transformation matrix between the two specified transform matrix using the specified transform plane to transform into 2D space i.e. XY position and Z rotation.
Read time 1 minuteLast updated 14 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
GetRelativeMatrix2D(Matrix4x4, Matrix4x4, TransformPlane, TransformPlaneCustom, bool)
public static Matrix4x4 GetRelativeMatrix2D(in Matrix4x4 transformFrom, in Matrix4x4 transformTo, PhysicsWorld.TransformPlane transformPlane, in PhysicsWorld.TransformPlaneCustom transformPlaneCustom, bool useScale = true)
Parameters
The transform used as a reference to transform from.
The transform used as a reference to transform to.
The transform plane to use.
The custom transform plane to use (if required).
If the returned matrix should include scale. Scale is not relative and always uses the transformTo lossyScale.
Returns
Type | Description |
|---|---|
| Matrix4x4 | The calculated relative transformation matrix. |