• Advertisement
Sign in to follow this  

Camera Projection

This topic is 2896 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement