Added a new way to calculate intersections with obstacles.
Simplified logic to split the valid range of positions when cornerAdjacent.