Original Post
So I have a Camera that I've setup using GLOrtho that has working zoom and panning but the problem I have is that it only zooms into the bottom left.
What I really want is to be able to zoom to either the center or some sort of arbitary point.
In my render loop I use
To scale and translate. I've tried translating before the Scale then after so that it scales from the center which causes the origin to be in the center. This is a problem because I apply bounds to the camera.
Basically how would I go about being able to zoom but also keep the view in bounds.
I can post more code if you need it.
What I really want is to be able to zoom to either the center or some sort of arbitary point.
In my render loop I use
GL.Scale(ZoomLevel, ZoomLevel, 0.0);GL.Translate(-(int)CameraController.ActiveCamera.Position.X, -(int)CameraController.ActiveCamera.Position.Y, 0);To scale and translate. I've tried translating before the Scale then after so that it scales from the center which causes the origin to be in the center. This is a problem because I apply bounds to the camera.
Basically how would I go about being able to zoom but also keep the view in bounds.
I can post more code if you need it.