- Home /
[Solved]How to change camera perspective ?
Hi everyone. I want to use some difficult camera, but i don't know how to get it. Below is an image of camera that i want. I want to change camera perspective coordinates without changing clipping plane coordinates. Thanks
cameraperspective.png
(12.3 kB)
Comment
Best Answer
Answer by Grish_tad · Jan 22, 2019 at 07:42 AM
I finally found how to do that. If someone needs it here is code.
public float horizObl = 0;
public float vertObl = 0;
void LateUpdate()
{
SetObliqueness(horizObl, vertObl);
}
void SetObliqueness(float horizObl, float vertObl)
{
Matrix4x4 mat = Camera.main.projectionMatrix;
mat[0, 2] = horizObl;
mat[1, 2] = vertObl;
Camera.main.projectionMatrix = mat;
}
You can change horizObl , and vertObl for your needs
Your answer
![](https://koobas.hobune.stream/wayback/20220612190212im_/https://answers.unity.com/themes/thub/images/avi.jpg)