Jump to content

Rotate screen to Landscape when the game opened


Mamallan
 Share

Recommended Posts

Hi,

Any one please let me know how we can rotate the mobile screen to landscape when the game is opened.

The game always should open in landscape view. if you are in portrait view and once you open the game your mobile screen automatically should rotate to landscape.

Please anyone suggest on this.

Link to comment
Share on other sites

You can't from the web. You'd have to do some awkward hack involving rotating the screen, which probably wouldn't work nicely. You can also detect screen dimensions and display a message asking the user to rotate their device, the only issue is that you only get the device orientation event after the screen has already rotated so its not absolutely ideal.

If you throw your stuff into a native wrapper (like Cordova/Phonegap) you can lock orientation at device level.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...