1 decade ago by stahlmanDesign
I have a test where the accelerometer works, but when you rotate the iPad, the accelerometer doesn't change direction. Is it possible to detect device orientation in Impact?
This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact
window.onorientationchange = function() { var orientation = window.orientation; switch(orientation) { case 0: // portrait - do something break; case 90: // landscape - do something break; case -90: // landscape - do something break; } }