Hi guys, I was wondering if someone could give me a description of what setProjectionMatrix(cam.combined) means in layman’s terms? What does it do and why and when should I use it? etc
in layman’s terms ?
you have something that can draw to the screen via gpu like the spritebatch. And you have a camera.
you gotta tell the spritebatch where we are / where the camera is looking, because on screen shall be what the camera is looking at.
It means you’re telling the SpriteBatch (or what have you) to use the the projection and view matrices of the camera [icode]cam[/icode]
What is the projection and view matrices? They’re how you get from 3D object vertices in the “world” to 2D locations on your screen.
Here’s an explanation (with pictures): http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/#The_Model__View_and_Projection_matrices