K
Kano_Stuff
Guest
Hi everyone !
I'm new to gml and GMS 2 and i have a weird bug with physics.
(I'm sorry, english isn't my native language, i hope you'll understand me)
twitter.com/kano_stuff/status/869202284118499328
(Inside the link there's is a gif of this bug)
I made a while ago a prototype of this game on Construct 2 and the "script" was something like :
Impulse towards position (x,y,impulse) -> (player.x, 0, impulse)
Whatever the player's angle/the ground's angle, the jump was nice and towards the top of the room.
I tried to code something like this but it's not working :/
Can anyone help me ?
I'm new to gml and GMS 2 and i have a weird bug with physics.
(I'm sorry, english isn't my native language, i hope you'll understand me)
twitter.com/kano_stuff/status/869202284118499328
(Inside the link there's is a gif of this bug)
Code:
//Jump script (BUTTON A)
if (gamepad_button_check_pressed(0,gp_face1)) && place_meeting(x,y,collider_obj) {
physics_apply_impulse(phy_position_x,0,0,player_jump);
}
Impulse towards position (x,y,impulse) -> (player.x, 0, impulse)
Whatever the player's angle/the ground's angle, the jump was nice and towards the top of the room.
I tried to code something like this but it's not working :/
Can anyone help me ?