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

Game maker physics horizontal movment

G

george_a3iristos

Guest
Hello!

I use game maker physics for a game.
I want an object to move horizontal only but gravity takes it down.
How do I make an object ignore the physics gravity?

Thanks in advance :)
 
C

CaffeineJunky

Guest
Gravity essentially adds to your velocity in the direction that it points. If you do motion_add(speed, direction) in the direction that is opposite to the gravity each step, this will counter-act the gravity. I'm not quite sure how your gravity is set up, but this idea should help.
 

Jezla

Member
In the case of physics, you'll need to apply an upward force to the object that counteracts the gravity.
 
Top