obstacles collision detection.