• 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!

GML Find the height of a sprite at a given X

H

hazonsassoun

Guest
Hello,

I have a very big sprite like this, with a PRECISE collision box:
http://www.noelshack.com/2018-51-4-1545342830-lv-1.png

As you can see, this is the ground of my game, and its width is 4096px. And I would like to know what's the height of the ground at x=300 for example.

I know I could write a script that tests position_meeting or place_meeting at each Y but I think it would be very slow to do each frame of the game. Is there any smarter method ? Thanks.
 
Top