• 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 Need help with GMS 2 physics functions

Hello all, I'm having some trouble with some of the physics functions. It's been a real thorn in my side and hopefully someone can help.

I basically have a function that puts forces on the player object when using an analog stick on a gamepad, and I'm trying to add a sort of "dash" action when the player presses a button, however the player never moves any faster than a certain amount, even when set to something crazy like 900, and I've gone even higher, what am I missing? I also made sure to check "Enable Physics" on the object, although I tried both ways it doesn't seem to matter much.
Here is my code ("WyvernState" is just an enumerator on the player, also this is on the Begin Step event, and "Force" is set to 75):
upload_2019-9-2_17-55-19.png

Thanks for the help, and I'm sorry if this is a stupid question!
 
Last edited:

2Dcube

Member
Not a stupid question at all. Even if it was don't be sorry ;)

There is a maximum velocity that physics objects can move at. This is to prevent weird situations; even in real life physics, there is a maximum velocity too otherwise you'd go beyond the laws of physics.

If you want things to move faster on the screen you could try adjusting the physics scale with
Code:
physics_world_create(pixeltometrescale);
at the start of your game. (Or it can be set in the room settings window too I think).
 
Adjusting the physics world scale seems to be the right direction for what I want. I never used the physics engine before so I'll have to mess with it to get what want.
Thank you!
 
Top