Jump to content

EXACT_FIT scaling does not work as expected on mobile device


hdouss
 Share

Recommended Posts

I am trying to scale my game like this:

this.scale.scaleMode = Phaser.ScaleManager.EXACT_FIT;
this.scale.pageAlignHorizontally = true;
this.scale.pageAlignVertically = true;
this.scale.forceOrientation(false, true);
this.scale.updateLayout(true);
this.scale.refresh();

My understanding of EXACT_FIT is that it stretches the game so it will fill the entire screen and (much probably) does not keep proportions.

So, there is no chance that the game height will be larger than the screen height.

When I try my game in the Intel XDK emulators, scaling works as expected in all the devices suggested in the emulator.

But when I try to install the apk on my phone, or I try to debug (with Intel XDK) on my phone the game scales on width but keeps its original height which exceeds my screen height (this.scale.height has the same value as this.game.height).

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

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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