Jump to content

how do I horizontally flip an animation made of spritesheets?


arcanine
 Share

Recommended Posts

 if (cursors.right.isDown) {	player.animations.play('left',15);	player.x += 1;	player.scale.x *=-1;}

this is the code I have that triggers when the user pressed right on the keyboard 

 

my sprite sheet has a character that faces left and down, but I want to flip the left sprites horizontally to create a right 

facing character 

 

when I press right on the keyboard, the character faces left then right then left really quickly alternating between both directions why is this happening?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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