Check collision only in y axis

Unpedro

Member
Hey, i'm triying to make a tetris ghost piece, but it glitchs only in this case

my code is if place_meeting(x, y, solid_o){

y -= 8}

if !place_meeting(x, y + 1, solid_o)and(!place_meeting(x, y + 1,wall_o)){

y += 8}

if place_meeting(x, y, wall_o){

y -= 8

}

Post image
 
Top