diff options
author | ubq323 <ubq323@ubq323.website> | 2024-04-04 00:45:09 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-04-04 00:45:09 +0100 |
commit | cad220d2551e746255287644f6017276a9a805bf (patch) | |
tree | 3ce1a3c260b7a60e9cc26e321d04b4ca73f391f8 | |
parent | fa84db80b41e89b35aefeefc60670bb7c0cf3875 (diff) |
launch cactus
-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 |