Improved collision detection with non-rectangular obstacles.