Hi there,
I'm working on a project that uses Get Device Roll a simple tilting effect on an iPad2.
It was working great a year ago, but then I stopped working on it, and now I upgraded to Unity4 and started working on it, and I'm getting the wrong values for the roll angle.
The project is setup to work on any landscape orientation, and I've put in place orientation checks to check if the device is in Right or Left orientation at any given moment, including startup.
I also reimported a newer version of Playmaker from the asset store to update the actions, but it didn't fix the problem.
I set up a very simple test using a Get Device Roll and outputting the angle in a GUI text.
There are three observations:
1- When completely horizontal, the Angle reads 1.5 instead of 0. If I roll the device to one side it gets closer to 0 and to the other side gets closer to 3.
It's like it thinks it is in a portrait orientation, even if the debug State Label shows it is in the correct orientation.
2- The total values for a 180 degrees turn seems to center at 1.57 and top at 3.14 before going negative (instead of 1.5 and 3).
3- If I start the app in Right Landscape the angle values are positive and the range goes from 3 tilting left to 0 tilting right.
If it starts in Left Landscape the value is negative and goes from 0 tilting left to 3 tilting right.
I have tried a LOT of things to fix this, but have not been successful.
Any help would be greatly welcomed.