Sprite rotation question
-
What would the command be for flipping a Sprite horizontally?
I have a character running to the right with the dpad, but when I want him to move to the left, the best I could come up with was rotating -180 but that flips him upside down as well...
I searched through the commands for sprites and don't think I found anything so far.
Anyways, what can I do?
-
@lawyerlounge try setSpriteScale(sprite, sprite.xscale * -1, sprite.yscale)
As this is not very obvious we may add a flipSprite function at some point.
-
yup that did the trick!
-
@lawyerlounge, @pianofire I'm going to be using this later tonight I think... looks like a nice trick, so you don't need to draw mirrored sprites for every frame.