Need help with stopping camera movement at the edge of the world

So I am making a simple 2d sandbox game. It is generated with random chunks of 25 tiles wide and I can’t seem to figure out how to stop the camera at the beginning of the first chunk and the end of the last chunk (whichever number of chunks in the world.) So if I could get some help that would be great.
Thanks :slight_smile:

Personally I’d just create either a big trigger for the part you want to move in, or smaller colliders on the edge which will disable camera follow ontriggerenter. That way it is fairly easy to graphically determine where the edge of the world is. If your world is generated on the run, so you don’t know where the edge is, you’ll either need to write a script that determines the edges (perhaps by examining how the chunks are spawned), or you’ll need to introduce a background which will mask the outside of your map, as well as clamp the movement so the player cannot get out of bounds.

I’m sorry I’m really new to this if you could explain more in depth that would be great.
Thanks!