moved player when it collides with obstacle