Unity VR headset x,y and z location

HI, i was wondering how to get the HTC Vive Pro’s headset x, y and z location in Unity 2019. Is it using the InputTracking.GetNodeStates. If so how do i use that function to get the x, y and z location as integers.

Thanks

I haven’t tried the Vive Pro, but on Quest you just look at Camera.main.transform.position. My guess is that that would work just fine on Vive as well.

1 Like

Using the tracked pose drivers from XR Legacy Input Helpers the Vive Pro works exactly the same as any other headset.

3 Likes

Thanks for the reply guys, i found the solution. Its just
Vector3 position = UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.Head);

Thanks guys

3 Likes