Rotate screen to Landscape when the game opened

Recommended Posts


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.

Share this post

Link to post
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.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.