List
Get ARCamera FOV
Posted Date: 2018-09-05 10:59     Edited Date: 2018-09-06 4:10     Writer: inactive

Hi all,

I am trying to get the ARCamera FOV but every time I access the FOV it returns 60 and not the real FOV which I guess is overridden by the SDK. If I create a new camera and try to match the FOV I get something around 31.5.So, how can I get the real FOV of the ARCamera?

My ARCamera WorldCenterMode is set to Camera (since it is required for my project).

(Please note that this Question is a possible duplicate of https://developer.maxst.com/BoardQuestions/Details/362. I had to post this again because I didn't find the solution/answer which might help me solve my problem.)

Any help on this is appreciated.

Thanks.

Posted Date: 2018-09-06 4:10     Edited Date: 2018-09-06 4:10     Writer: slkim

Unity does not change FOV as a projection matrix.
So We send to you how to get FOV as the projection matrix.

Matrix4x4 projectionMatrix = CameraDevice.GetInstance().GetProjectionMatrix();
float fov = 2.0f * Mathf.Atan2(1.0f, projectionMatrix.m11);