Get single axis from gyroscopic input (iOS)
Ok so I need to axis the tilt of the iPhone left to right, and forwards to backwards. I need this in 360 degrees, or a value of 0-1. I currently can access this using Input.gyro.attitude, and Input.gyro.attitude.eulerAngles, the problem is that when I rotate the device around the upwards axis (imagine moving to a different side of the table (90 degrees change in that rotation), means that the axis no longer give the same values.
So for example, landscape upright gives the value of 270 for eulerAngles.y, while it gives 360 when I rotate it so it faces my left. By the way, I am testing this with on screen feedback on a device which cannot autorotate, so yeh, just saying.
Your answer
Follow this Question
Related Questions
Ignore gyroscope yaw 0 Answers
Finding physical world x,y,z with respect to an iOS device camera 2 Answers
IOS gyro trick ? 0 Answers
Trying to dynamically animate a Gimbal? 0 Answers