u/MacheteToothpick

how do i flip a single image without flipping the entire screen?

how do i flip a single image without flipping the entire screen?

https://preview.redd.it/9okygw9z9fwg1.png?width=635&format=png&auto=webp&s=8eb648c54a3f416dd621f0f41874be729627a7ff

as you can see this is a very primitive looking project (for now), but I'll polish everything up once I've gotten the essentials done and over with.

I want to flip the pickaxe sprite to give it the illusion of rotation rather than actually rotating it, since when I tried to using:

pushMatrix();

translate(x,y);

rotate(radians(spriteRotate));

image(sprite, x,y,100,100);

popMatrix();

it didn't work out in the slightest.

I also tried to use the scale() function, cycling through scale(100,100), scale(100,-100), scale(-100,-100), scale(-100,100), but that just flipped the entire screen. I'm new to coding so I don't know much outside of these methods. If anyone knows how I can solve this I'd be a happy man

reddit.com
u/MacheteToothpick — 3 days ago