diff options
| author | Elizabeth Alexander Hunt <me@liz.coffee> | 2026-05-16 08:10:20 -0700 |
|---|---|---|
| committer | Elizabeth Alexander Hunt <me@liz.coffee> | 2026-05-16 08:10:20 -0700 |
| commit | 7d415c4958f584c031922ed77a3559d15bf2dc1b (patch) | |
| tree | 1957ccc8a42de22778b639352b38d9091a4adf4d /camera.lua | |
| parent | 8cd9ec2e98d27b414bc7cff3a5a98b0aad9099ce (diff) | |
| download | dyl8-7d415c4958f584c031922ed77a3559d15bf2dc1b.tar.gz dyl8-7d415c4958f584c031922ed77a3559d15bf2dc1b.zip | |
Snapshot
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) |
