- Home /
Camera View Matrix in Script
I am looking to get a Camera component's "view" matrix in a script. I see that I can get the projection matrix using Camera.projectionMatrix, but I don't see a Camera.viewMatrix property...
I want these matrices in a script for a 3D graphics refresher tutorial that will visualize a camera's view and projection transforms in the form of game objects (representing vertices) that can be moved around the scene.
Comment
Best Answer
Answer by allenwp · Sep 20, 2013 at 03:23 AM
It looks like Camera.worldToCameraMatrix is the transform that is commonly referred to as the "View" matrix. After transforming some vectors using this and the projection matrix, I am getting the exactly results that I was expecting. Awesome. :)
Your answer
![](https://koobas.hobune.stream/wayback/20220613114354im_/https://answers.unity.com/themes/thub/images/avi.jpg)