parent
6f5e670324
commit
30c7525103
@ -8,6 +8,7 @@ function airutils.move_target(player, pointed_thing)
|
|||||||
--minetest.chat_send_all(dump(object))
|
--minetest.chat_send_all(dump(object))
|
||||||
if object then
|
if object then
|
||||||
local obj_pos = object:get_pos()
|
local obj_pos = object:get_pos()
|
||||||
|
if not obj_pos then return end
|
||||||
local hip = math.sqrt(math.pow(obj_pos.x - pos.x,2)+math.pow(obj_pos.z - pos.z,2)) + 1
|
local hip = math.sqrt(math.pow(obj_pos.x - pos.x,2)+math.pow(obj_pos.z - pos.z,2)) + 1
|
||||||
local pos_x = math.sin(yaw) * -hip
|
local pos_x = math.sin(yaw) * -hip
|
||||||
local pos_z = math.cos(yaw) * hip
|
local pos_z = math.cos(yaw) * hip
|
||||||
|
Loading…
x
Reference in New Issue
Block a user