• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Quick question about collision masks

Psycho_666

Member
Hey.
Can I change the size of a collision mask in-game?
I am making fake 3D so the objects further away seems smaller, but that doesn't seem to have scaled the collision mask, and I kinda need the mouse over effect.
If I can't change the size of the collision mask I will just calculate the mouse position and completely ignore all collision events.
I'm not really sure which one is more compute heavy...
 

Psycho_666

Member
bdd71df36e1ef51ac815258a14373f0e356a22e5_2_1440x904.png
Just to visualise, the mouse is pointing between the 4 ellipses on the top, but the collision masks overlap and that's the result - all 4 objects react to the mouse over. I want just one to do that...
 

Psycho_666

Member
The issue is not the sprite. The issue is the scaling.
I'll try and program a script, where every object that is highlighted (in my case the 4 circles) check the distance to the mouse cursor and the nearest to the mouse gets actually highlighted, while the others just wait.
 

HayManMarc

Member
You're welcome, glad I helped.

BTW, I found the answer by typing this into google search: gml gms2 sprite mask not scaling
When I do searches using this format, I usually find what I'm looking for. Sometimes it's hard to get the wording right, tho.

Happy coding! :)
 

Psycho_666

Member
I just implemented this system... It 💩💩💩💩ed up everything... I'm making stupid mistake somewhere and I'm not entirely sure where...
I'll redo all the coding and will see what is going on...

PS: I fixed it... Its perfect. I could kiss you, but I won't...
 
Last edited:
Top