GetRelativePose2D(in Matrix4x4, in Matrix4x4, TransformPlane, in TransformPlaneCustom, out Vector2, out float, out Vector2)
Get the relative transformation pose (translation, rotation and scale) between the two specified transform matrix using the specified transform plane to transform into 2D space.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
GetRelativePose2D(Matrix4x4, Matrix4x4, TransformPlane, TransformPlaneCustom, Vector2, float, Vector2)
public static void GetRelativePose2D(in Matrix4x4 transformFrom, in Matrix4x4 transformTo, PhysicsWorld.TransformPlane transformPlane, in PhysicsWorld.TransformPlaneCustom transformPlaneCustom, out Vector2 translation, out float rotation, out Vector2 scale)
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).
The 2D relative translation.
The 2D relative rotation.
The 2D relative scale. Scale is not relative and always uses the transformTo lossyScale.