drhayes Posted March 25, 2014 Share Posted March 25, 2014 I read elsewhere on the forum (lessmilk post?) that a good way to horizontally flip sprites was to set the scale to a negative number. When I do that, my sprite falls through the tilemap floor, unlike when the scale is set positive. Here's a link: https://dl.dropboxusercontent.com/u/75126/fallingscale/index.html Any ideas? Link to comment Share on other sites More sharing options...
drhayes Posted March 25, 2014 Author Share Posted March 25, 2014 Okay, weirdly, if I set the scale in update instead of create it works as expected. Still... any ideas? Link to comment Share on other sites More sharing options...
rich Posted March 25, 2014 Share Posted March 25, 2014 Upgrade to 2.0.1 please (it was only released today), as it resolves numerous weird little issues like this. Link to comment Share on other sites More sharing options...
drhayes Posted March 26, 2014 Author Share Posted March 26, 2014 I upgraded to 2.0.1 and now I'm seeing a different issue: https://dl.dropboxusercontent.com/u/75126/fallingscale/index.html When the game begins the sprite flies off to the left almost immediately. Removing input controls has no effect. If I remove the call to this.sprite.scale.setTo(-2, 2) from the create function then the sprite behaves normally. When I make calls to scale.setTo in the update function everything works as expected. It's not blocking me, but it's kinda weird. Link to comment Share on other sites More sharing options...
codercade Posted March 26, 2014 Share Posted March 26, 2014 Yup, I posted a comment on an issue that seems to be new to 2.0.1 : https://github.com/photonstorm/phaser/issues/644 Link to comment Share on other sites More sharing options...
Magnifisite Posted March 29, 2014 Share Posted March 29, 2014 You can fix it by setting the x anchor to 1.(Atleast that did work for me). Link to comment Share on other sites More sharing options...
Recommended Posts