Forum Discussion
PierreM
10 years agoHonored Guest
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.
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.
1 Reply
Replies have been turned off for this discussion
- WmDrivenHonored GuestI 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.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 months ago
- 6 months ago