kuoruan Posted April 4, 2018 Share Posted April 4, 2018 https://photonstorm.github.io/phaser-ce/Phaser.ScaleManager.html#forceOrientation Phaser 2 has the api to force orientation. What about Phaser 3? Like this game, which is written with Phaser 2 http://game.webxinxin.com/tacit/ Source: https://github.com/channingbreeze/games/tree/master/tacit If user's phone is portrait, the game rotate 90deg, and fill the screen (width < height). The user will rotate their phone. If user's phone is landscape. the game show as normal (width > height). Stathis 1 Link to comment Share on other sites More sharing options...
kuoruan Posted April 5, 2018 Author Share Posted April 5, 2018 Any ideas to rotation the game view? I add css transform: rotate(90deg) to the root canvas, but the click is in the wrong position. Link to comment Share on other sites More sharing options...
kuoruan Posted April 9, 2018 Author Share Posted April 9, 2018 Link to comment Share on other sites More sharing options...
digitsensitive Posted April 9, 2018 Share Posted April 9, 2018 I think there is nothing similar in Phaser 3. But what are you trying to accomplish? If you have a game for smartphone you might want to put a wrapper around (Ionic/Cordova). Link to comment Share on other sites More sharing options...
samme Posted April 9, 2018 Share Posted April 9, 2018 It would be difficult to remap input onto a rotated canvas. Just try to detect orientation and add a message for the user. Link to comment Share on other sites More sharing options...
kuoruan Posted April 10, 2018 Author Share Posted April 10, 2018 19 hours ago, WizaEric said: I think there is nothing similar in Phaser 3. But what are you trying to accomplish? If you have a game for smartphone you might want to put a wrapper around (Ionic/Cordova). I added some info about what I want to do. Is there any way to impl this? Link to comment Share on other sites More sharing options...
Recommended Posts