mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 20:11:06 +01:00
add a small bit of doc
This commit is contained in:
parent
78940e109c
commit
6c804f44d5
1 changed files with 2 additions and 0 deletions
|
@ -198,9 +198,11 @@ function ARROW_ENTITY.on_step(self, dtime)
|
|||
end
|
||||
|
||||
local arrow_dir = self.object:get_velocity()
|
||||
--create a raycast from the arrow based on the velocity of the arrow to deal with lag
|
||||
local raycast = minetest.raycast(pos, vector.add(pos, vector.multiply(arrow_dir, 0.1)), true, false)
|
||||
for hitpoint in raycast do
|
||||
if hitpoint.type == "object" then
|
||||
-- find the closest object that is in the way of the arrow
|
||||
local ok = false
|
||||
if hitpoint.ref:is_player() then
|
||||
ok = true
|
||||
|
|
Loading…
Reference in a new issue