Added more logging and changed orientation back to normalizing.

This commit is contained in:
Harrison Deng 2021-05-07 20:43:39 -05:00
parent aaff45aaa4
commit 0783f96e2d

View File

@ -249,7 +249,7 @@ local function attemptBreakDown(notPattern)
end
local function orient(v, forward, right)
v = v / (v:length() * v:normalize())
v = v:normalize()
print("Attempting to orient such that " .. tostring(v) .. " == " .. tostring(forward) .. ".")
if vectorEqual(v, forward) then
return true
@ -437,6 +437,7 @@ local function quarry(x, y, z, forward, right, pattern)
local bool reverseTrip = false;
for xDelta=1,math.abs(x) do
for zDelta=1,math.abs(z) do
print("X,Z: " .. xDelta .. "," .. zDelta)
local success = true;
if reverseTrip then
orient(vector.new(0,0, -z), forward, right)