Background off-center after upgrading to 4.5

Godot Version

Godot 4.5

Question

I just upgraded from 4.4 to 4.5 and my game’s background got pushed down

I saw a comment in the docs that the camera limit behavior was changed, limits of 0 weren’t ignored now. I do use right / left limits and not top / bottom, but I’m having trouble figuring out if this is the case here. Nothing changes if I change the top/bottom limits

The other UI elements, for example the HUD, are fine, the only difference between it and the background is the follow_viewport_enabled.

I feel like I’m so close to figuring out what’s wrong here. I guess I could set the camera anchor mode to top left, but I really want to understand why the layout changed between versions. Any help will be much appreciated!

It’s a very specific type of problem which is hard to repeat kindof. If 4.4 works for you stick with it. What I believe is that if you’re using tilemaps, they’ve changed it a bit. Now it’s tile layer(or something like that. I work in 3D games I have little knowledge about 2D😅).
On every new version just ask yourself are the new features actually be any use to you? I upgraded to 4.5 because I’m working in 3D and they introduced stencil support that I can leverage in my project.

If anyone has the same question - the problem was indeed the changed limits. Before the top limit was 0 and even though Godot used to say it was ignored - it seems that it really wasn’t. The camera’s anchor is positioned at the top in this photo from version 4.4, though it’s set to drag center:

Version 4.5 below. Every single attribute is the same, but the anchor is now (correctly) in the center.

I set the top limit back to zero and moved the whole camera half the viewport height down and everything is back to the way it was before the update!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.