Yonaba / Jumper

Fast, lightweight and easy-to-use pathfinding library for grid-based games
http://yonaba.github.io/Jumper
MIT License
617 stars 124 forks source link

Expose a line of sight method to the Grid class #17

Open Yonaba opened 11 years ago

Yonaba commented 11 years ago

Will check if a given node is visible from another given node.

-- Returns true if nodeB is visible from nodeA or vice versa
-- allowDiagonal will depend on the number of allowed directions when moving.
function Grid:lineOfSight(nodeA, nodeB)
Yonaba commented 10 years ago

I will definitely have to try Eugen Dedu's Bresenham-based supercover line algorithm for the following reason:

Yonaba commented 10 years ago

There is an implementation available.

Yonaba commented 10 years ago

The following paper can also serve as reference: A fast voxel traversal algorithm for raytracing (direct pdf link)