summaryrefslogtreecommitdiff
path: root/demo/FPSCamera.lua
diff options
context:
space:
mode:
Diffstat (limited to 'demo/FPSCamera.lua')
-rw-r--r--demo/FPSCamera.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/demo/FPSCamera.lua b/demo/FPSCamera.lua
index 7ee3cf8..7c33242 100644
--- a/demo/FPSCamera.lua
+++ b/demo/FPSCamera.lua
@@ -42,6 +42,13 @@ function camera:update(dt)
movement:setAt(1, 0)
movement:normalize()
+
+ if honey.input.key.is_down(honey.input.key.left_shift) then
+ movement:add(Vector.Vec3.Y_UNIT, movement)
+ end
+ if honey.input.key.is_down(honey.input.key.left_control) then
+ movement:sub(Vector.Vec3.Y_UNIT, movement)
+ end
movement:muls(self.movement_speed*dt, movement)
self.position:add(movement, self.position)