Jump to content

Preload bar doesn't work if scale is set


Legomite
 Share

Recommended Posts

I have a preload bar that's set using the Phaser function game.load.setPreloadBar.

 

It works fine if there is no scaling applied, but it doesn't even move or get cropped when I scale the sprite. I scaled it to 25. 

 

Anybody know what's going on? Thanks!

Link to comment
Share on other sites

Maybe it's unrelated, but I found a bug where you would need to use the original sprite dimensions when cropping a sprite. Say you have a rectangle sprite of 100x50, you want to crop it horizontally, for example, 10x50. If you scale the sprite, you will always need to write that the crop rectangle height is 50, even though the sprite might now be 10px high. Same goes with the width. Looks like the crop rectangle doesn't know and doesn't care about the scaling that can occur on the sprite.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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