GameMaker: Studio

GameMaker: Studio

View Stats:
Flipping / Mirroring Sprite?
I know that the sprite editor has the ability to mirror and flip images, but is there any way to mirror / flip a sprite when simply drawing it to the screen?

I see that draw_sprite_ext has the ability to draw the sprite rotated, but rotating the sprite I'm trying to draw causes it to look distorted. I could always just add additional sprites to my project that already have the image mirror and / or flipped, but that would mean more texture space taken up.
< >
Showing 1-8 of 8 comments
Daynar Sep 7, 2015 @ 11:46am 
makeing image_xscale negative flips it horizontally and making image_yscale negative flips it vertically. Note that you may experience wierd behavior if you do this and the origin isnt centered though. You can manually draw it using draw_sprite_ext or streched and micromanage the numbers to get it working correctly if needed.
Once again you come to my aid. Thanks a ton!

I figured there would be a way to do it, but I didn't find any functions related to it. I checked everything that seemed relevant... never would have thought the the xscale or yscale could be used to alter it. I thought those were only for size scaling.

Thanks again. I'll have to try that out.
sK_ramke Feb 2, 2017 @ 1:17pm 
Originally posted by Daynar:
makeing image_xscale negative flips it horizontally and making image_yscale negative flips it vertically. Note that you may experience wierd behavior if you do this and the origin isnt centered though. You can manually draw it using draw_sprite_ext or streched and micromanage the numbers to get it working correctly if needed.
Thank you man,helped me too !
Mnooper Apr 5, 2017 @ 8:17am 
Originally posted by Daynar:
makeing image_xscale negative flips it horizontally and making image_yscale negative flips it vertically. Note that you may experience wierd behavior if you do this and the origin isnt centered though. You can manually draw it using draw_sprite_ext or streched and micromanage the numbers to get it working correctly if needed.
*making
Ha ha. You really dug up a thread from 2015 to make a single minor spelling correction?
Last edited by BOYCOTT S-T-E-A-M!; Apr 5, 2017 @ 12:48pm
Skunk Shampoo Apr 7, 2017 @ 8:45am 
Er... Not all heros wear capes? XD
sitebender Apr 7, 2017 @ 1:49pm 
They also travel back in time to write a wrong.
Originally posted by sitebender:
They also travel back in time to write a wrong.
*right :steammocking:
< >
Showing 1-8 of 8 comments
Per page: 1530 50

Date Posted: Sep 7, 2015 @ 11:41am
Posts: 8