Using MRTK and Vuforia in Unity - What Camera to choose?

跟風遠走 提交于 2019-12-14 02:05:02

问题


Im new to AR and set up the last days MRTK and Vuforia on Unity. Both operated fine independently and now I want to use both in one project. But the problem is that both have a camera. MRTK has its own MixedRealityCamera and Vuforia the ARCamera. How to use one camera, using MRTK and Vuforia? I guess using two cameras in one scene is not good.

I found this post: https://github.com/Microsoft/MixedRealityToolkit-Unity/issues/1461#issuecomment-373714387

So I tried to transfer the components from the MRTKCamera to the ARCamera and in reverse. But Vuforia wont recognize the images anymore. If I delete the MRTKCamera and create the ARCamera it works fine.


回答1:


I solved it, the problem was the clipping plane value.

"Basically don't attach mrtk scripts to vuforia camera, instead use vuforia scripts attached to a copy of MRTK camera prefab. I made a copy of MRTK Mixed Reality Camera prefab and attached Vuforia Behavior script to it.

Then make sure to change the near clipping plane value in camera manager script component to something very less, say 0.0001." by Roopesh Reddy



来源:https://stackoverflow.com/questions/53830695/using-mrtk-and-vuforia-in-unity-what-camera-to-choose

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!