Forum Discussion
sh0v0r
11 years agoProtege
How to get the Absolute Head position relative to the Camera
I am trying to do a visualisation of the players head position relative the real world location of the camera.
In the previous SDK there was a method for getting it but it has been removed and I can't find an equivalent.
So far I've been looking here:
Ovr.TrackingState state = OVRManager.capiHmd.GetTrackingState(0);
state.HeadPose.ThePose.Position.x.ToString("F2") + ", " + state.HeadPose.ThePose.Position.y.ToString("F2") + ", " + state.HeadPose.ThePose.Position.z.ToString("F2");
But that gives me the relative position of the last 'centred' location.
In the previous SDK there was a method for getting it but it has been removed and I can't find an equivalent.
So far I've been looking here:
Ovr.TrackingState state = OVRManager.capiHmd.GetTrackingState(0);
state.HeadPose.ThePose.Position.x.ToString("F2") + ", " + state.HeadPose.ThePose.Position.y.ToString("F2") + ", " + state.HeadPose.ThePose.Position.z.ToString("F2");
But that gives me the relative position of the last 'centred' location.
1 Reply
Replies have been turned off for this discussion
- vrdavebOculus StaffHave a look at OVRManagertracker.GetPose(). It returns the IR tracking camera's pose relative to the OVRCameraRig, which is at the last "centered" location.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device