From 3eebc13766b33c1daf803f8241359b2ff3927ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Sun, 23 Aug 2015 23:36:33 +0200 Subject: [PATCH] Use graphics.translate --- main.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.lua b/main.lua index 86dfb05..5859856 100644 --- a/main.lua +++ b/main.lua @@ -183,8 +183,7 @@ end function drawGame() -- Shake camera if hit if scrn_shake > 0 then - love.graphics.camera_x = 5*(math.random()-0.5) - love.graphics.camera_y = 5*(math.random()-0.5) + love.graphics.translate(5*(math.random()-0.5),5*(math.random()-0.5)) end -- Draw terrain (skyscrapers etc.)