New Path Tracing - Floor
Path Tracing System
The path tracing system works in two steps.
Verify that there is a surface in the cell that can be stood on.
Determine which directions can be navigated from this cell.
Old Floor Tracing
The current tracing always tests using five traces: the four diagonal corners that bound the space in the cell an actor can stand and the center.
1
2
4
3
5
The first test is at the base of the cell to see if the actor can fall through the cell. The next check is to see if there is a floor. The last check is to see if the actor can stand in the cell while standing. The final height is determined by averaging the height of the 5 generated line/brush intersections.
New Floor Tracing
The new tracing will use box tracing instead of line tracing. Each function call will be slower,but fewer calls will be made. This will more accurately detect obstructions in the actor's space.
The initial test starts with a line trace from the center of the base of the cell to the center of the top of the cell. If the line does not start in a cell, the first intersection with a brush marks the top of the cell beneath. The line is then recast to the other side of the brush, which is then treated as the floor. The brush located closest to the bottom that meets this criteria is treated as the floor for that cell. Next, a series of box traces is made,starting from the step-up height above the floor to the top of the model and is the actor size in width. At the point the trace intersects with a brush is marked as the ceiling for that cell. If the trace starts in a brush, the cell is marked unenterable.
The new test will account for the actor's size. While multiple passes will now be required for each sized actor, the data generated will allow for the actor to navigate correctly based on its size.