Performs a line-of-sight check on a per-tile basis.
Performs a line-of-sight check on a per-tile basis.
1 number startX
the starting tile grid X position number-startY-the starting tile grid Y position number-endX-the target tile grid X position number-endY-the target tile grid Y position number-dist-the maximum check distance bool-noConversion-whether the specified coordinates should not be converted into tile space (in case the passed coordinates already are tile-space) number-iterationCallback-the method to call when stepping on a new tile. Return false to prematurely end the LOS check.
2 number wallCheckCallback
the method to call when checking for a wall on all sides of the tile. Return true to indicate obstruction by a wall. Uses a sensible default if none is provided.
1 bool
whether the LOS check reached it's target position.