I just finished figuring out how to do tilt based movement in landscape mode. In landscape, tilt left and right = beta, in portrait, tilt left and right = gamma.
<img src="http://www.coflash.com/stuff/tilt.png" border="0" />
But... I can't see a way to make it detect which orientation is in use.
I want to make it so that if you're in landscape, use the beta events (and ignore gamma), and if in portrait, use gamma (and ignore beta).
At the moment if I incorporate both it's a mess - either that or I only leave the beta tilt on and in portrait I have to tilt up and down rather than left and right :/
Any ideas? Is there an event I'm missing? It's really easy in basic HTML/JS so maybe I'm just missing how to detect this in Construct? I'm going to try alpha of which I just noticed -_-
Edit: Alpha only reports every now and then, then disappears. Should I be using 'AngleAt(index)' or 'AngleForID(id)' somehow?
Looks like I also needed to pay attention to one of the values I was changing...
From my findings gamma changes at 30 / 65 / -30 / 60 / back to start
Has anyone got a working file of this sort of detection that works properly?
Develop games in your browser. Powerful, performant & highly capable.
Using orientations changes in C2 is kinda hard, but there a plugin would help you