Using the Projection Matrix to zoom in on a screen

BlitzMax Forums/BlitzMax Programming/Using the Projection Matrix to zoom in on a screen

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

The essence of the page that Leadwerks pointed to is not to use the projection matrix for changing the position or orientation of the camera, and to use the modelview matrix for that, and it applies to 2D or 3D. However I don't think it hurts to use the projection matrix to scale the camera lens to make things zoom in and out - but really you should move the model itself towards or away from the camera. So instead of looking at the projection matrix try scaling the modelview matrix, or translating it in Z to push it away from/towards the camera. It's safer and more supported to move the model than to move the camera. Use the projection matrix for changing the field of view/shape of the viewing frustum, but not its location in space.