diff options
| author | iamcheeseman <[email protected]> | 2026-04-05 10:15:18 -0400 |
|---|---|---|
| committer | iamcheeseman <[email protected]> | 2026-04-05 10:15:18 -0400 |
| commit | 779fc71a8be224c22c7e650983d7af4c06854138 (patch) | |
| tree | ad0ab9ebe353af663ab54c560a55ab34e8ad217d /src | |
| parent | 5c5e9adcae6333b4048c874c2abc7ea9ecb6ef94 (diff) | |
fix: round camera position when drawing
If we don't round the camera position, it can cause jittering since
things are no longer drawn at a rounded position.
Diffstat (limited to 'src')
| -rw-r--r-- | src/camera.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/camera.lua b/src/camera.lua index 3283c0c..31bfe9e 100644 --- a/src/camera.lua +++ b/src/camera.lua @@ -36,6 +36,6 @@ function use_camera_transform() local w, h = SCR_WIDTH / 2, SCR_HEIGHT / 2 lg.scale(active_cam.zoom) lg.translate( - -active_cam.realx + w / active_cam.zoom, - -active_cam.realy + h / active_cam.zoom) + round(-active_cam.realx + w / active_cam.zoom), + round(-active_cam.realy + h / active_cam.zoom)) end |
