Jump to content

Force portrait orientation


vince
 Share

Recommended Posts

Hi all, I've just started using Phaser and think it is a great framework!

 

I'm in the process of developing a game with it now, and can't seem to be able to force users into the Portrait orientation (or any orientation). A search on the forums led my to this line of code:

 

game.stage.enableOrientationCheck(false, true, 'orientation');

 

but when I added this in my function create(), I get the following error:

 

Uncaught TypeError: Object #<Object> has no method 'enableOrientationCheck'

 

Not sure what am I doing wrong, would greatly appreciate if anyone could help out! Thanks!

Link to comment
Share on other sites

It changed, you'll find a similar method here now: game.stage.scale.checkOrientation();  which is in src/system/StageScaleMode.js.

 

Though I still had issues figuring out how to make this work, maybe you'll have better luck.  

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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