Can you help me understanding cameras?

Godot Version

4.2.2

Question

I cant get working cameras/limits

Im creating a RPG game with tiles, im working on movement and such but I’m facing issues with camera position!

I cant seem to match the camera to the blueish (the game viewport? i think) box. And even that if they match I would need to restrict the camera/map to only the visible map and not show grey areas

This is how it looks now and it moves a little I think I really messed it up but I need help to recover it and understand it. Im googling/youtubing but it seems now


I managed to move the purple rectangle by brute forcing the offset values, i dont think that’s the optimal way, and still the screen shows grey things outside what I need to restrcit it. How can I make the screen adjust to the current scene?

Some things that may help:

  • You should be able to move the camera around by changing its position.
  • It has a zoom property that you can adjust so that the view of the camera is the size you want it to be.
  • It has “limit” properties, like limit_bottom , that prevent it from going too far in a given direction, which you can set to prevent it from scrolling beyond your desired view.
1 Like

Thanks a lot! I managed to at least make it watchable with that, thanks!