GMS 2 Walking Problem

Aegean

Member
Hello guys, I have been working on my rpg game project but I have struggled with walking animation. While I am pressing the "vk_right" It goes right but a little bit below the ground. Here are my codes.
Code:
keyLeft = keyboard_check(vk_left) || keyboard_check(ord("A"));
keyRight = keyboard_check(vk_right) || keyboard_check(ord("D"));
keyAttack = keyboard_check_pressed(ord("H")) || keyboard_check_pressed(ord("Z"));

switch(state)
{
    case PLAYERSTATE.FREE: PlayerStateFree(); break;
    case PLAYERSTATE.ATTACK_SLASH: PlayerStateAttackSlash(); break;
    case PLAYERSTATE.ATTACK_COMBO: PlayerStateAttackCombo(); break;
}
I couldn't fix it and I hope you can help me.
 
Top