Skip to content

Format

typescript
Transform.GetPositionAndRotation(ref_pos, ref_rot)

class: Transform

Description

Get the position and rotation of the Transform component in world space.

When getting both the position and rotation of the Transform, calling this method is more efficient than querying them separately.

Parameters

param_nametypedescription
ref_posVector3World coordinates
ref_rotQuaternionWorld rotation

Return

typedescription
void

Code Example

typescript
let transform = this.transform;
let vec3_o = new Vector3;
let quat_o = new Quaternion;
transform.GetPositionAndRotation(vec3_o, quat_o);