Ignore gyroscope yaw
Hi, I've added controls to my game using the gyroscope gravity. It works perfectly but the only position for the input to be null is when the phone is flat (and the gravity vector is straight down).
To make possible to play the game also in other orientations I added an initialRotation which rotates the gravity vector to offset the "null rotation".
The problem is that this solution works only when the phone is turned towards north, when the gyroscope attitude yaw is 0. If I turn around the offset rotation causes also a rotation around the Y axis of the gravity vector.
How should I obtain a quaternion attitude which ignores the yaw rotation?
I'm aware of the gyroscope quaternions being in a different coordinate system, that's why I apply the offset directly to the gravity vector.
Thanks a lot!
Your answer
Follow this Question
Related Questions
Get single axis from gyroscopic input (iOS) 0 Answers
Gyroscope controls ufo game? 0 Answers
Im trying to make a player move 360 degree gyroscopic movement on my phone 0 Answers
Moving.Rotating a Raycast with Respect to Rotation 1 Answer
How to make a 2D rigidbody vertically when input is via the gyroscope 0 Answers