Skip to content

Format

typescript
Transform.InverseTransformPointAndRotation(ref_point, ref_rot)

class: Transform

Description

Converts a position and rotation from world space to local space.

Parameters

param_nametypedescription
ref_pointVector3The position to be converted.
ref_rotQuaternionThe rotation to be converted.

Return

typedescription
voidThe 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);