nenosw Posted June 14, 2016 Share Posted June 14, 2016 Hi, I'm new to phaser, so I took an example from the site and started playing around a little bit. I want to make a little platformer, just to see how things work. I started adding a sprite with only a right facing animation, so when the character is walking left, I flip the animation. So the first thing that happened is that the sprite jumps too far left when turning, because I didnt set the anchor correctly. When i fixed the anchor with (0.5, 0.5), the sprite turns to the left as wished, but the bounding box stays too far to the right. How can I solve this problem. I attached 2 pictures to demonstrate the problem: http://pastebin.com/pC60vixf Link to comment Share on other sites More sharing options...
rich Posted June 15, 2016 Share Posted June 15, 2016 Which version of Phaser? Link to comment Share on other sites More sharing options...
nenosw Posted June 15, 2016 Author Share Posted June 15, 2016 Phaser v2.4.8 Link to comment Share on other sites More sharing options...
LTNGames Posted June 15, 2016 Share Posted June 15, 2016 Yea, there is a bug in 2.8 that does that to the bounding box, the latest version in the dev branch works great and seems stable enough to me, so you could upgrade to fix the bounding box problem. Dev 2.4.9 RC4 - https://github.com/photonstorm/phaser/blob/dev/build/phaser.js Tilde 1 Link to comment Share on other sites More sharing options...
nenosw Posted June 15, 2016 Author Share Posted June 15, 2016 that was it, thank you very much Link to comment Share on other sites More sharing options...
Recommended Posts