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

Speed of object in physics room

R

ReportMePls

Guest
Hi all!
I have a silly question, cause i'm newbie in GM yet :D

I have a room with physics and gravity equals 0.
There is a ball, controlling by player (only moving left and right by arrows), and it's vertical moving is permanent with the same speed all the time.
At start of level, it begins to move vertically - i use "physics_apply_impulse(x, y, 0, -20)", is it ok?
Also i can use "phy_speed_y = 4" as defining vertical speed for ball, will it be the same?

Anyway, the main problem for me now: sometimes when ball collides with block at its edge, the ball could change its vertical speed to lower or higher
How could i define permanent vertical speed for it? %)


Screenshot for better understanding:



Thanks in advance!
 
Top