Puzz3l Posted May 17, 2014 Share Posted May 17, 2014 I want to have my game only playable in landscape, so I added the following code to my game.js // Autorotate screen function reorient(e) { var portrait = (window.orientation % 180 == 0); document.getElementById('game_div').style["-webkit-transform"] = portrait ? "rotate(90deg) translate(248px, 248px)" : ""; } window.onorientationchange = reorient; window.setTimeout(reorient, 0);Unfortunately, now if I try and use buttons/controls while holding the phone portrait, things get wonky. Buttons don't press and the input is clearly being messed with. How do I resolve this? Link to comment Share on other sites More sharing options...
Puzz3l Posted May 17, 2014 Author Share Posted May 17, 2014 Looks like this (unfortunately) answers my question. Link to comment Share on other sites More sharing options...
Tymski Posted April 22, 2017 Share Posted April 22, 2017 wow that sucks Link to comment Share on other sites More sharing options...
Recommended Posts