Skip to content

Commit

Permalink
more sensitive keyboard control
Browse files Browse the repository at this point in the history
  • Loading branch information
SwissalpS committed Apr 16, 2024
1 parent d5e24d6 commit 39ef71c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -416,26 +416,26 @@ local on_step = function(self, dtime, moveresult)
if not pro then
-- inverted controls
if keys.up then
rot.x = rot.x + dtime
rot.x = rot.x + dtime * 0.25
elseif keys.down then
rot.x = rot.x - dtime
rot.x = rot.x - dtime * 0.25
end
else
-- pro pilot controls: forward pushes
-- nose down, back pulls up
if keys.up then
rot.x = rot.x - dtime
rot.x = rot.x - dtime * 0.25
elseif keys.down then
rot.x = rot.x + dtime
rot.x = rot.x + dtime * 0.25
end
end
end
-- ignore if both directions are pressed
if keys.left or keys.right then
if keys.left then
rot.z = rot.z - 2 * dtime
rot.z = rot.z - 2 * dtime * 0.5
elseif keys.right then
rot.z = rot.z + 2 * dtime
rot.z = rot.z + 2 * dtime * 0.5
end
end

Expand Down

0 comments on commit 39ef71c

Please sign in to comment.