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