Skip to main content
Participant
April 13, 2015

Track position of Oculus in Unity scene?

Hi, I'm trying to make it so that my player controller follows the oculus' position in real space accurately. I.e. If i move my head to the left, my entire body in-game should shift to the left.

How do I get the position of the oculus in real space in Unity? I can't seem to use the centereyeanchor because the transform.position values are a little weird. When I rotate my head without moving it sideways at all, the position of the centereyeanchor changes as well, which is not the effect I want.

Anyway to get the exactly transformations in real-space of the Oculus in Unity?
    This topic has been closed for replies.

    1 reply

    Up and Coming
    April 13, 2015
    That's how I track the DK2 position in real-space in Unity :

    OVRPose pose = capiHmd.GetTrackingState().HeadPose.ThePose.ToPose();
    this.position = pose.position;
    this.orientation = pose.orientation;