mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Make line_of_sight return blocking node position
This commit is contained in:
parent
33de69a173
commit
d9ef072305
4 changed files with 16 additions and 6 deletions
|
@ -1308,8 +1308,9 @@ minetest.set_mapgen_params(MapgenParams)
|
|||
^ flags and flagmask are in the same format and have the same options as 'mgflags' in minetest.conf
|
||||
minetest.clear_objects()
|
||||
^ clear all objects in the environments
|
||||
minetest.line_of_sight(pos1,pos2,stepsize) ->true/false
|
||||
^ checkif there is a direct line of sight between pos1 and pos2
|
||||
minetest.line_of_sight(pos1, pos2, stepsize) -> 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue