Format
typescript
Transform.InverseTransformPointAndRotation(ref_point, ref_rot)class: Transform
Description
Converts a position and rotation from world space to local space.
Parameters
| param_name | type | description |
|---|---|---|
| ref_point | Vector3 | The position to be converted. |
| ref_rot | Quaternion | The rotation to be converted. |
Return
| type | description |
|---|---|
void | The converted position and rotation. |
Code Example
typescript
let transform = this.transform;
let point = new Vector3(5,0,0);
let rotate = new Quaternion(1,0,0,0)
transform.InverseTransformPointAndRotation(point,rotate);
Debug.Log(point,rotate);