diff options
Diffstat (limited to 'camera.lua')
| -rw-r--r-- | camera.lua | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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) |
