Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetPositionAndRotation(out Vector3, out Quaternion)

Gets the position and rotation of the Transform component in world space.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

GetPositionAndRotation(Vector3, Quaternion)

public void GetPositionAndRotation(out Vector3 position, out Quaternion rotation)

Parameters

position


rotation

Remarks

When getting both the position and rotation of a transform, calling this method is more efficient than querying to Transform.position and Transform.rotation individually.