Jump to content

Sprite Flip / Boundig Box problem


nenosw
 Share

Recommended Posts

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

 

boundingprob.png

boundingprob2.png

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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