Closed error454 closed 5 years ago
Check out the ComputerVision sample. It calculated the camera FOV based on the camera intrinsics there.
Thanks, I did find it tucked away in one of those BP's. If it helps anyone, here is the C++ equivalent using the image intrinsics:
const float FOVHor = 2.f * FMath::RadiansToDegrees(FMath::Atan2(ImageSizeX, 2.f * FocalLengthX));
const float FOVVer = 2.f * FMath::RadiansToDegrees(FMath::Atan2(ImageSizeY, 2.f * FocalLengthY));
I am trying to fit some 3D menu items to fill the screen and it would be very helpful to be able to query the horizontal or vertical field of view when using ARCore.
I tried looking at the projection matrix calculation but the implementation for
ArCamera_getProjectionMatrix
seems to be in another library. If I could see how this matrix is constructed, I could work backward.