mirror of
https://github.com/kepler155c/opus
synced 2024-12-24 23:50:26 +00:00
turtle not pathing backwards
This commit is contained in:
parent
9ee63da66f
commit
e6a98b34cb
@ -173,7 +173,8 @@ local function pathTo(dest, options)
|
|||||||
|
|
||||||
-- use single turn method so the turtle doesn't turn around
|
-- use single turn method so the turtle doesn't turn around
|
||||||
-- when encountering obstacles
|
-- when encountering obstacles
|
||||||
if not turtle.gotoSingleTurn(pt.x, pt.y, pt.z, pt.heading) then
|
-- if not turtle.gotoSingleTurn(pt.x, pt.y, pt.z, pt.heading) then
|
||||||
|
if not turtle.goto(pt) then
|
||||||
local bpt = Point.nearestTo(turtle.point, pt)
|
local bpt = Point.nearestTo(turtle.point, pt)
|
||||||
|
|
||||||
table.insert(blocks, bpt)
|
table.insert(blocks, bpt)
|
||||||
|
Loading…
Reference in New Issue
Block a user