• 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 Unwanted Downwards Movement Using Physics System After Changing Rooms

B

Ben Hubble

Guest
Hello! I'm making an RPG game using these tutorials by Heartbeast:
https://www.youtube.com/playlist?list=PL9FzW-m48fn2ug_FSNnfozQs3qYlBNyTd
And the player and enemies uses physics, however, when i try to change rooms all of my physics obects start moving down at a constant rate of about (i'm just estimation here) 2-3 px/s. Also, i can fight against the downward pull by going up, but i move up at a slower rate, if that is important.
Does anyone know what's going on here?

EDIT: Also, it's only the objects with a desity higher than 0 that are moving down. I'm kinda a noob at physics, this is my first time using it.
 
Last edited by a moderator:
B

BeardyElf

Guest
In you room settings at the physics tab, set gravity x and y to 0. I think that should help in your case.
 

dphsw

Member
I haven't used Physics in Gamemaker, but I'm just going to make a suggestion based on my experience of other game engines, that maybe it takes a moment to load the next room, and to compensate for the amount of time that has passed, the physics system tries to update everything by more than it should, including momentarily applying more gravity than it should. That would explain why the massless objects (those without density) don't start moving.

Based on that hypothesis, I'd suggest you try using physics_pause_enable to stop the physics updates during any loading.
 
Top