Center RTS Camera on Zoom Out

This seems like a similar problem.

Coming next is my read to the problem, might be wrong with the math but I found the problem pretty intriguing :rolleyes:

You could define your pyramid with 4 points defining the four corners of your map and another point defining its center (the top). You might be able to find each plane’s normal by using cross product. Once you have all the normals, you should be able to decide if you’re inside the pyramid or not. With this result, you should stop increase in the Z axis. Depending on the plane you’re getting out (the one with dot product < 0), you should stop the camera from moving towards it.

Good luck!