Fix camera bounds

This commit is contained in:
2024-02-10 16:46:11 +01:00
parent c738ce5c14
commit 0d6ae7814e

View File

@@ -9,11 +9,9 @@ static Rectangle getCameraBounds(Camera2D camera) {
Rectangle bounds = {
.x = camera.target.x,
.y = camera.target.y,
.width = GetScreenWidth() * camera.zoom,
.height = GetScreenHeight() * camera.zoom,
.width = GetScreenWidth() / camera.zoom,
.height = GetScreenHeight() / camera.zoom,
};
//bounds.width *= 0.8f;
//bounds.height *= 0.8f;
bounds.x -= bounds.width * 0.5f;
bounds.y -= bounds.height * 0.5f;
return bounds;