New Path Tracing - Walls
Old Wall Tracing
The old wall tracing code draws two line traces to detect walls that would obstruct movement along normals. This could cause problems with rails that are placed between these line traces, like in the mine map.
The old code would also deduce if an actor could move diagonally (the blue arrow) based on the ability to move to adjacent normals then to the target cell (black arrows). This method fails if there is a post that is between all four cells that can be walked around following the normals.
Ox
Oy+1
Ox+1
Oy +1
Ox
Oy
Ox+1
Oy
Ox
Oy+1
Ox+1
Oy +1
Ox
Oy
Ox+1
Oy
New Wall Tracing
Using a box trace, the entire path can be checked for obstructions, including diagonally. Assuming an origin of 0,0,0 is UNIT_HEIGHT/2 above the center point of the floor, the box traced would start STEP_UP above the floor of the source cell and end 1 unit below the lower ceiling of the source and destination. The box trace will be parallel to the XY axis and would be as wide as the actor. Any obstruction found prevents movement.
The move from left to right cannot be made. The step is too high. However you can move from right to left, if you are short (crouching).