Skip to main content
New Participant
June 16, 2015

Unity 5.1 - Rotation behaviour of InputTracker

I'm quite new to Unity Oculus integration, I'm trying to write a simple Flying game with 5.1. I started the project with Unity 5.0 and Oculus Integration Plugs few days ago, now I've updated my unity engine to 5.1, but now I can't figure out what is happening. Something very basic that I don't see, I guess.

in 5.0 I was using a GameObject (LeftEyeAnchor from OVR plugin) for applying force to its RigidBody parents; in order to move where I was looking; now i'm trying to use the native class with static member InputTracking. But can't figure out what i'm missing in the implementation. Any advices about how to translate InputTracking.GetLocalRotation(VRNode) to a rigidbody in a way that make it move where you look?
Thanks.
    This topic has been closed for replies.

    1 reply

    New Participant
    June 17, 2015
    I don't fully understand your implementation, but I've done something similar that should work the same way in 5.1.

    I put a rigidbody on the root object and made the PlayerController+Camera a child of that.

    Then, in script, I just read the Anchor's localRotation and apply a percentage of that every frame to the root rigidbody, which would look something like:

    transform.localRotation *= positionalTracker.localRotation * 0.1f;


    I hope this helps.