Hey everyone, Volvary here.
As some might have seen recently, I've been working for a little while on an Android game with sound and rotation as the main components for input/output.
Well, one of those mechanic has given me quite the mental workout and that is the rotation.
So first off, I will be explaining what I mean by rotation. What I want to achieve is what could be described as AR (Augmented Reality). Think of it as the phone acting as a "window" to the game world. By moving the phone around, you would be able to move your view inside the game and see what hides in that direction.
I have tried multiple things but I can't seem to get it to work.
So in order:
First I tried rotating my camera by Input.acceleration. By itself, it gave off something very imperceptible. Scaled to greater sensibility, it revealed to be detecting 2-5 motions a frame even with the phone laid on a surface, causing sporadic movements.
Then I tried Input.gyro (making sure to activate it). But whatever I tried, I couldn't get any value to display anything else than 0. (Does the phone I am testing on has a gyro? I have no idea, I still suck when it comes to mobile dev)
The thing is I'm pretty sure it can be done. (And with only the accelerometer, if I'm not wrong, making it stable) But I'm dumbfounded as to why it failed. And since I don't know the proper term for what I'm trying to do, I can't find a single piece of information that can help me right now.