GMS 2.3+ How to NOT scale mask?

Lady Glitch

Member
So it appears that scaling a sprite also scales its mask. No matter if I scale it by xscale/yslcale, draw manually with draw_sprite_ext(), change the mask from "same as sprite" to something different, or keep it as it is.

With that, my bounding box collisions get messy. I would like to keep my object sprite's scalings purely visual. How can I do that?
 

Shut

Member
Set up variables in create event:

GML:
custom_scalex = 2;
custom_scaley = 2;
Draw event:

GML:
draw_sprite_ext(sprite_index,image_index,x,y,custom_scalex,custom_scaley,image_angle,image_blend,image_alpha);
then change custom_scale variables however you want.
 

TsukaYuriko

☄️
Forum Staff
Moderator
image_angle also modifies the mask. So, in total, don't use image_xscale, image_yscale and image_angle (or in other words, keep their values at 1, 1 and 0, respectively).
 

Lady Glitch

Member
I've made another project and it actually works, so it appeared that my problem lies elsewhere.
Thank you for your answers.
 
Top