- Edited
Hi! I'm new to Godot and game dev (been at it for maybe two months now) and am struggling with Viewports. I've only just figured out how to use them at all today, and I did so using a fairly outdated tutorial so it's possible my issue is coming from there.
My game consists of 4 screens, each taking up a corner of the games window or optionally resizing to take up the whole screen. Up until recently each corner was just a node2d under a root node2d and I was resizing them manually. I want my left two screens (it might make sense looking at screen shots) to be able to zoom in and out and to move around so that players can manipulate the way that they look at the maps in these screens. To do this, I'm trying to restructure my existing code into some subviewports with cameras that can handle all the zooming and panning I need to do. Everything is laid out correctly in the editor, but when I run the actual scene all of the corners shrink and shift position so that they don't resemble the editor at all. I have included all the node settings I'm running and my scene tree can be viewed in the first screenshot of the editor.
Any help you can offer (even just pointing me to better viewport resources) would be greatly appreciated! I've really felt my progress grind to a halt as I've tried to figure this out and it's hurting me motivation to continue developing >,<
NOTE: the subviewport container size is actually 768 x by 432 y -> I realized this one had been resized to see if it would affect anything after I already posted, and reverted it back to that value,.
Solved! reddit suggested editing my cameras anchor positions to fixed top left, which shifted them up and to the left. The scaling was fixed by editing my camera zoom back to 1, or by editing my actual nodes being displayed to 2x scale