Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
spvn's avatar
spvn
Honored Guest
11 years ago

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?

1 Reply

Replies have been turned off for this discussion
  • 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;