From 4b87ebf9263215ae9a9a03d81b474bcf8b43465c Mon Sep 17 00:00:00 2001 From: rebecca Date: Sat, 28 Feb 2026 23:42:27 +0000 Subject: motion --- motion.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/motion.lua b/motion.lua index e469a16..715d038 100644 --- a/motion.lua +++ b/motion.lua @@ -20,17 +20,17 @@ local function strengthclamp(x) return math.max(math.min(x,4),0) end parallel.waitForAny( function() while true do - if vover then p.launch(0,-90,hstrength) + if vover then p.launch(0,-90,vstrength) else os.sleep(0) end end end, function() while true do htext.setText(tostring(hstrength)) vtext.setText(tostring(vstrength)) local _,key = os.pullEvent"key" - if key == 265 then hstrength=hstrength+hdelta - elseif key == 264 then hstrength=hstrength-hdelta - elseif key == 262 then vstrengtv=vstrengtv-vdelta - elseif key == 263 then vstrengtv=vstrengtv+vdelta + if key == 265 then vstrength=vstrength+vdelta + elseif key == 264 then vstrength=vstrength-vdelta + elseif key == 262 then hstrength=hstrength-hdelta + elseif key == 263 then hstrength=hstrength+hdelta elseif key == 67 then p.launch(yaw, pitch, hstrength) elseif key == 86 then vover = not vover vtext.setAlpha(vover and 255 or 0) -- cgit v1.2.3