0
\$\begingroup\$

I'm looking for the functions to get the position and rotation data of the rift headset itself in Unity.

I have the Oculus integration SDK installed and want to avoid using any pre-fabs.

\$\endgroup\$
0
\$\begingroup\$

you have an OVRCameraRig prefab in the scene then you can get the centerEyeAnchor transform as follows:

public OVRCameraRig cameraRig;

Vector3 headsetPosition = cameraRig.centerEyeAnchor.position;
Quaternion headsetRotation = cameraRig.centerEyeAnchor.rotation;

This holds the current position and rotation of the headset, and it always coincides with the average of the left and right eye poses.

If you don't want to use the default OVRCameraRig prefab you are gonna have to manually assign that property to the proper camera.

I hope this will help you!!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.