| Parameter | Description |
|---|---|
| transformFrom | The transform used as a reference to transform from. Only its position and rotation are used, the two values a physics body is built from, so its scale and any mirror above it do not affect the result. |
| transformTo | The transform used as a reference to transform to. |
| transformPlane | The transform plane to use. |
| useScale | If the returned matrix should include the scale of transformTo itself. When false, only its own local scale is removed; scale from its parents is kept. |
Matrix4x4 The calculated relative transformation matrix, the same as PhysicsMath.GetRelativeMatrix2D gives for a matrix built from transformFrom's position and rotation and transformTo's local-to-world matrix.
Get the relative transformation matrix between the two specified transforms using the specified transform plane.
For a custom transform plane use PhysicsMath.GetRelativeMatrix2D with each transform's local-to-world matrix instead.