I’ve tried to look in the forums but couldn’t find it and the scale(-1,0) doesn’t flip it either any idea on what to do
function setup() end function draw() background(40, 40, 50) -- add sprite width,height to command sprite("Planet Cute:Character Horn Girl",300,400,101,171) -- to reverse a sprite, make the x size negative sprite("Planet Cute:Character Horn Girl",300,300,-101,171) -- to flip a sprite, make the x,y size negative sprite("Planet Cute:Character Horn Girl",300,200,-101,-171) end
I’m surprised scale didn’t work. Maybe
scale(-1,1) , not
Scale changes what is being drawn and where. If you do scale(-1,1) it will reverse the Sprite, but also draw it at a -x position. So a Sprite drawn at 100,200 with scale(-1,1) will draw a reversed Sprite at -100,200.
Yeah, you’d have to do translate, rotate, scale and sprite it at the origin
It’s a lot easier just to include the sprites size in the command and make it negative whenever you want to flip it.
Depends, if you’re needing to rotate the sprite than you’ll be translating to the origin anyway, as
sprite doesn’t take an angle argument.