Discord
Login
Community
DARK THEME

Flip Sprite

I looked through the API and saw that sprites can be rotated. However, if I rotate a sprite 180 degrees, it is upside down. How can a sprite be flipped in reverse without having to create a new sprite facing the other way?

You can invert the draw scale:

screen.setDrawScale(-1, 1)   // flips the next draw operations horizontally
screen.drawSprite("icon", 0, 0)

screen.drawScale()   // resets the scale back to normal (1, 1)

but in Quick engine?

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community