

When your character runs, his legs move and - right like in real life - there's a brief moment when both of them aren't touching the ground. The reason your character animation glitches is because of the related collision mask. Your code is fine as is, maybe some lines can be written better and optimizations are possible. If (vsp 0) sprite_index = spr_player_jump

Key_jump = keyboard_check_pressed(vk_space) Here's the code I'm using: //get player input Everything was working fine before I added the "animate" section. I'm very new to game maker and programming in general, so I'm probably making some dumb mistakes. While moving sideways, the sprite slowly sinks into the floor. Both of the sprites flash when this happens. When I move side to side, the jump sprite moves along the ground while a single frame of the running sprite animation shows up above it and to the side. It now flashes in the same location as the run sprite when moving to the side. EDIT: I changed the origin of the run sprite to the center, and it is no longer hovering above the jumping sprite.
