Camera Projection

Started by
0 comments, last by The Communist Duck 14 years ago
hello I am working on a 2D side scrolling game using c++ and opengl... I am am bit lost at whether to use perspective projection or orthogonal projection for a 2d game...I have a player which is moving and the camera is following the player... I would like to know in what situations are these two projections used and what effect do they have on the game.. some explanations and examples on this would be of great help...
Advertisement
I would use Orthagonal.
IIRC, ortho projection means everything appears at its actual size. Perspective projection means everything changes size depending on how far from the camera it is.
If you have your camera at 0,0,0, looking down negative z, and a triangle at say 0,0,-10. If this moved to 0,0,-20, then there would be no size difference with glOrtho. However, it would appear smaller(half size?) with glPerspective.

This topic is closed to new replies.

Advertisement