https://developer.vuforia.com/forum/unity-extension-technical-discussion/vertical-fov-unity
這裡有寫道
這裡有寫道
Matrix4x4 mat = Camera.main.projectionMatrix;
float
a = mat[0];
float
b = mat[5];
float
c = mat[10];
float
d = mat[14];
float
aspect_ratio = b / a;
float
k = (c - 1.0f) / (c + 1.0f);
float
clip_min = (d * (1.0f - k)) / (2.0f * k);
float
clip_max = k * clip_min;
float
RAD2DEG = 180.0f / 3.14159265358979323846f;
float
fov = RAD2DEG * (2.0f * (
float
)Math.Atan(1.0f / b));
留言
張貼留言