Fix camera bounds
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user