diff options
-rw-r--r-- | cactus.lua | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -78,16 +78,16 @@ end local function moveby_xz(dv) if FACING.x ~= 0 then - move_linear(dv.x) + move_linear(dv:dot(FACING)) if dv.z ~= 0 then - turn_to_face(0,0,numutil.sign(dv.z)) - move_linear(math.abs(dv.z)) + turn_to_face(vector.new(0,0,numutil.sign(dv.z))) + move_linear(dv:dot(FACING)) end elseif FACING.z ~= 0 then - move_linear(dv.z) + move_linear(dv:dot(FACING)) if dv.x ~= 0 then - turn_to_face(numutil.sign(dv.x),0,0) - move_linear(math.abs(dv.x)) + turn_to_face(vector.new(numutil.sign(dv.x),0,0)) + move_linear(dv:dot(FACING)) end end end |