How can I make camera bounds for an RTS style game.

I’m trying to make a top down rts game for which I got my camera working as required. But I have a problem, my camera currently doesn’t have any limits.

I want to stop my camera when it reaches the edge or a boundary of the map just like clash of clans. My camera is a pawn. I tried using blocking volume to block the camera but it didn’t work.

If anyone know how to do this. Please help.

Thank You.

Either change the collision settings in your blocking volume to block the camera pawn or clamp the limits of where your camera can go in its movement code.

For example, when the camera movement is set to move on the X axis, check if its passed the limit. Let’s say the limit is 50. Branch off on the true connection and Clamp its X axis down to 50. That will keep that camera in line!

Thanks for the answer. I was just doing that. It works.

You are welcome, glad to see you worked it out.