- Sort Posts
- 11 replies
- Last post
AR Camera Field Of View
AR Camera Field Of View
Hi,
I'm trying the zoom in and zoom out too. I have tried to use another unity camera but the problem I have found are the parameters of one and other. For me is difficult create the same view in the Unity Camera than ARCamera. The field of view of both are different. For example, setting the same position, rotation, fov, etc. I see different views. If I play with fov I could see a similar view like ARCamera shows. But it is not identical. So, the ARcamera Fov = 63 and Unity Camera fov = 31. Now is similar but not the same.
How could I resolve it?
Regards,
Jordi
AR Camera Field Of View
Thank you for your reply. This has opened up a lot of possibilities. I like the thought of scaling the object dynamically to the camera's FOV. I'm also thinking about an alternative way to possibly handle it with a GUI sprite sheet.
Basically, it's like a FPS game with a 3D model parked up close to the main camera. I'm just using a large collider box around the model as the trigger toggle button. When touched, an animation plays. Problem is, like I mentioned before the FOV is always different per device and that model is either partially obscurred off the screen or noticeably smaller and pushed way into the screen... depending on which ipad I have been testing on.
I will try a few things and let you know if I figure anything out.
Is anyone else running into this problem? I'm curious if something like this happens on Andrioid models as well as iOS.
AR Camera Field Of View
Hi Jim,
the problem with using the 63 degrees FOV (or any custom value you may like) is that you risk to break the "visual effect" of making the 3D virtual objects appear consistent with the "real world";
this is because the "real world" appears in your screen as captured by the real device camera (which has its own optics and thus its own perspective FOV);
however, if you test on several devices and you see that the 63 degrees looks acceptable (and does not break the AR illusion), then of course you are free to use such FOV (in the end it's all a matter of how good it looks to the final user, and you can visually judge it much better than any "computer graphics theory" book :-) )
So, just be aware of the risk to break the AR illusion, but after all, if it looks OK, you can certainly go with it.
An alternative approach could be perhaps to dynamically adjust the scale of your "3D buttons" based on the screen aspect ratio (this is probably the best way of doing it).
AR Camera Field Of View
I am having a similar issue in the way I am doing onscreen buttons, using Unity primative cubes with colliders and without mesh renderers as buttons (children of the AR camera) and a GUI overlay over top of the whole thing. Sometimes I use actual 3D models as buttons in this same way. This is the case on a current project in which one of my models is parented to the camera and is supposed to appear in the bottom right hand corner.
But I have found that when I go from device to device even among those with the same resolution, the aspect looks completely different. I would like to force it into a specific field of view aspect at the start.
But I don't take your cautions lightly. Can you recommend the simplest and least invasive method for accomplishing this? For example, I've found that a field of view of 63 in the Unity editor looks ideal to go from device to device for what I am trying to accomplish.
Thank you!
Jim O'Donnell
Hi, if you really need to do
Hi, if you really need to do that, you may take a look and modify the code in QCARBehaviour.cs (code reported here for ease of reference):
Hi Alessandro, could you tell me where can I find this script?