diff options
author | Aki <nthirtyone@gmail.com> | 2016-05-13 21:39:50 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-05-13 21:39:50 +0200 |
commit | 8d51222d41a348867706ceaec80d36e017a8d7ab (patch) | |
tree | 60a17c31c7f08505def499c2aaa57ce3c241b213 /camera.lua | |
parent | 6c1b6bdb22449c15450bd61cb1bf75a323cb40b9 (diff) | |
download | roflnauts-8d51222d41a348867706ceaec80d36e017a8d7ab.zip roflnauts-8d51222d41a348867706ceaec80d36e017a8d7ab.tar.gz roflnauts-8d51222d41a348867706ceaec80d36e017a8d7ab.tar.bz2 |
Scaling
Diffstat (limited to 'camera.lua')
-rw-r--r-- | camera.lua | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -5,6 +5,7 @@ Camera = { x = 0, y = 0, + scale = 4, follow = nil } @@ -39,11 +40,11 @@ end -- Move follow function Camera:moveFollow () - local x,y,i = 145, 90, 1 + local x,y,i = 145, 120, 1 for k,point in pairs(Nauts) do i = i + 1 x = math.max(math.min(point.body:getX(),290),0) + x - y = math.max(math.min(point.body:getY(),180),0) + y + y = math.max(math.min(point.body:getY(),180),20) + y end x = x / i - 145 y = y / i - 90 |