New Path Tracing - Actor Size
Actor Size Issues
The old code was hard-coded into one size- specifically for 1X1 units. The new code will directly account for actor size in the tracing functions. This will generate different connection data based on actor size and will be stored in different arrays. The array to be used for pathfinding will be passed to (or refered to by index) when calling the A* functions.
Ox
Oy+1
Ox+1
Oy +1
Ox
Oy
Ox+1
Oy
Ox
Oy+1
Ox+1
Oy +1
Ox
Oy
Ox+1
Oy
Ox
Oy+2
Ox+1
Oy+2
Ox+2
Oy+2
Ox+2
Oy+1
Ox+2
Oy+1
1X1 Actor
(and 2X2 Actor connection grid)
2X2 Actor cell grid
It is important to remember, however, that while an 2X2 actor actually takes up 4 cells, the tracing functions will evaulate and return a single cell's worth of data. The floor and ceiling data for a 2X2 actor at cell (0,0) will cover all the cells occupied by that 2X2 object when it is located at (0,0), including (1,0), (0,1), and (1,1). The data at (1,0) will includ the data for (2,0), (1,1), and (2,1), and so on. The cell data will overlap, but this is ok. This also means that there will be no data at rows and columns 255. This makes sense, as a 2X2 actor would then be half way off the map.