From Minetest Developer Wiki
minetest.line_of_sight(pos1, pos2, stepsize)
Returns true/false, pos
- Check if there is a direct line of sight between pos1 and pos2
- Returns the position of the blocking node when false
- pos1 First position
- pos2 Second position
- stepsize smaller gives more accurate results but requires more computing time. Default is 1.
This article is missing examples, feel free to add them.
This article is incomplete.