Rest of input functions and camera system functions.

This commit is contained in:
jussi
2022-06-05 12:24:06 +03:00
parent b8d2fcd795
commit 9598d72b8b
6 changed files with 350 additions and 23 deletions

View File

@@ -103,7 +103,7 @@ end
local function tileCollision( entity )
local vPos = entity.pos + entity.vel -- Future pos with current vel.
local vRect = util.tableClone( entity.colRect )
local tinyGap = 0.001 -- Tiny slit between collisionRect and tile to prevent getting stuck on all seams.
local tinyGap = 0.001 -- Tiny gap between collisionRect and tile to prevent getting stuck on all seams.
-- Move test rect to predicted position.
vRect[1] = vPos.x - vRect[3] / 2