novaknole Posted March 23, 2020 Share Posted March 23, 2020 I need help with one more thing and this is the most important part. If you look at this game (http://game.webxinxin.com/tacit/) , when you go to portrait mode, it doesn’t show the game in a portrait mode, but still shows in landscape mode even if you’re in a portrait mode. So if you’re in a portrait mode, you still have to rotate the screen in order to play. When I did this, mode: Phaser.Scale.ENVELOP, autoCenter: Phaser.Scale.CENTER_BOTH, It shows the game in portrait mode directly which just is bad because it shows the game in a bad shape. So is there a way to show the game in a portrait mode as on that game link I posted? The way this is handled in that game link is the following code: Phaser.World.prototype.displayObjectUpdateTransform = function() { if(!game.scale.correct) { this.x = game.camera.y + game.width; this.y = -game.camera.x; this.rotation = Phaser.Math.degToRad(Phaser.Math.wrapAngle(90)); } else { this.x = -game.camera.x; this.y = -game.camera.y; this.rotation = 0; } PIXI.DisplayObject.prototype.updateTransform.call(this); } but i have no idea how to implement this code in phaser 3. what is even PIXI? or Phaser.World? this code directly doesn’t work in Phaser 3. Any idea? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.