Collisions on moving objects

Is there a way where I can only use the X axis as an dist()? Because what happens now is that every time the objects meet on the Y axis the program stops

1 Like