Added rounding values so no infinite moving loop.
This commit is contained in:
parent
683b61a640
commit
e74e1f4eef
@ -366,6 +366,7 @@ local function moveBy(delta, forward, right)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function moveTo(dest)
|
local function moveTo(dest)
|
||||||
|
dest = vector.new(tonumber(string.format("%.0f", dest.x)), tonumber(string.format("%.0f", dest.y)), tonumber(string.format("%.0f", dest.z)))
|
||||||
sendLog(MOVETO, "Attempting to move by (" .. dest.x .. "," .. dest.y .. "," .. dest.z .. ") (x,y,z).")
|
sendLog(MOVETO, "Attempting to move by (" .. dest.x .. "," .. dest.y .. "," .. dest.z .. ") (x,y,z).")
|
||||||
if position == nil or heading == nil then
|
if position == nil or heading == nil then
|
||||||
sendLog(FAILED, "Position or heading is invalid.")
|
sendLog(FAILED, "Position or heading is invalid.")
|
||||||
|
Loading…
Reference in New Issue
Block a user