From 7d415c4958f584c031922ed77a3559d15bf2dc1b Mon Sep 17 00:00:00 2001 From: Elizabeth Alexander Hunt Date: Sat, 16 May 2026 08:10:20 -0700 Subject: Snapshot --- camera.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'camera.lua') diff --git a/camera.lua b/camera.lua index b2dcf4c..6062ee7 100644 --- a/camera.lua +++ b/camera.lua @@ -42,11 +42,9 @@ end _cull_factor = 1/4 function Camera:render(entity) screen_position = (entity.sprite_position or entity.position) - self.position - if not screen_position:in_bounds(SCREEN * -_cull_factor, SCREEN * (1 + _cull_factor)) then - return + if screen_position:in_bounds(SCREEN * -_cull_factor, SCREEN * (1 + _cull_factor)) then + entity:render(screen_position) end - - entity:render(screen_position) end function Camera:new(tracking) -- cgit v1.3