analyze surroundings when hits an obstacle