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

Making an object constantly move at a set speed when using physics

J

James R

Guest
I am trying to make an object rise from the bottom of the screen at a set speed but I happen to be using the physics engine and I'm not sure how to program it to do so.
 
L

Linkdeous

Guest
You really shouldn't use the physic engine, make your own everything, might be it gravity or collision, it's really easy, you have lot of tutorial for it.

Anyway the solution of your problem is very simple ; unset the physic or whatev on the object you want to make rise from the bottom of the screen. When's done, you just have to code a very simple movement code :
Step Event :
y-=spd

spd being NOT the built in variable, but the number of pixel that the object will move each step. Hope it will help you
 
J

James R

Guest
If I try to use normal movement functions in a physics enabled world they wont move, I will try again. Thanks for the reply.
 
J

James R

Guest
Never mind what I said, Thank you, I just tried it and it worked
:)
 
Top