I tried to cumulate xRotation, yRotation and zRotation values received from the gyroscope in CoronaSDK but it didn’t help.
When I run an app the initial values are 0, 0 and 0. Then I turn device to some direction little bit and values are changing properly, then I turn the device back to initial position and I can see how cumulate values return to zero which is nice. However, if I rotate device more (like 3-4 full turns to same direction and then back) values are significantly off of zero.
In this approach I see 2 problems:
-
the value doesn’t return to 0 as I expect;
-
the initial value is 0,0,0 and I cannot determine the device’s position in space according to the ground.
On iOS that can be easily reached by calling
CMMotionManager.deviceMotion.attitude.yaw
CMMotionManager.deviceMotion.attitude.pitch
CMMotionManager.deviceMotion.attitude.roll
Are you planning to improve the gyroscope in CoronaSDK?