Forum Discussion

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

Head tracking movements Oculus Quest

Hello,

I use Unity 2019.2.0f1 and Oculus Integration V 17.0 for Oculus Quest.
I wanted to know if it is possible to detect the movement of the helmet in play?
I created a game and when the player makes a head movement, I would like to receive if he made a movement.
Is possible?

thank you,
cordially

5 Replies

Replies have been turned off for this discussion
  • Yes, just track the head anchor position vector3.magnitude and set a minimum delta to register as confirmed movement (without that check you'll always return true from sensor noise and very fine movements)
  • Thank you for your reply,
    But that's not what I'm looking for exactly.

    What I want for example:
    The player moves his head at 55mph, then his speed is 0.5f, and when he stops moving his head, then the speed is 0mph, so speed is 0f.

    Your solution is good but it reminds me of Vector3.Distance is not what I want.

    I found a similar solution but only for Touchpad :
    OVRInput.GetLocalControllerAcceleration(OVRInput.Controller.LTouch) - Vector3.zero);
    OVRInput.GetLocalControllerAcceleration(OVRInput.Controller.RTouch) - Vector3.zero);

    So I get the speed of movement of Left and Right Touchpad like this
    Vector3.SqrMagnitude(OVRInput.GetLocalControllerAcceleration(OVRInput.Controller.LTouch) - Vector3.zero);
    Vector3.SqrMagnitude(OVRInput.GetLocalControllerAcceleration(OVRInput.Controller.RTouch) - Vector3.zero);

    How can I detect that the player stops moving with the head when he reaches his new position, like the "OVRInput.GetLocalControllerAcceleration ()" function;?

    Thank you,
    cordially