Hi I’m tracking the Oculus Touch Controllers in my game and noticed some very strange behaviour which I don’t understand.
Essentially I’m using code like this get rotational values from the Touych Controller to control my vehicle:
helicopter.VRInputYaw (gameObject.transform.localRotation.y * yawTwistAmount);
The behaviour I have noticed is the localRotations values polarity will flip if I rotate the controller in full 360-degree rotations on a pivot in real world space.
e.g. level starts and twisting the controller left will turn my craft left (Y values move in a negative direction), if then rotate/pitch the touch controller down and fully rotate it in a 360 circle the twisting of my controller to the left will now turn my craft to the right (Y values move in a positive direction but im still turning in the same direction as before).
Also, it’s worth noting this inversion of values is random on starting my game, sometimes my craft turns right others it turns left when twisting in same directions. My guess is it is due to the controller rotation values on spawning. Currently this is completely breaking my game.
Does anyone have any hints on what is occurring and how to get normal functionality as I have with my Vive Controllers? Thanks