Reputation: 468
Why the View Matrix is inverse of A Camera Matrix ? I can't understand this relationship can anyone please explain this to me. Formally Vector to a camera is calculated as follow
toCameraVector= (inverse(viewMatrix)*vec4(0,0,0,1.0)).xyz-worldPosition.xyz;
Upvotes: 1
Views: 1748
Reputation: 118
A camera in the 3D world is actually an imaginary object. There is no actual camera. So we need to simulate camera by doing things the opposite way. If we need to move the camera to the left in the 3D world, we move everything in the scene to the right. That is why the View Matrix is the inverse of the Camera Matrix.
For more info about Model, View and Projection matrices (and more) check out this.
Upvotes: 3