无法更改Google纸板相机的FOV [英] Unable to change FOV of the google card board camera

查看:84
本文介绍了无法更改Google纸板相机的FOV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google纸板统一SDK开发适用于Android的狙击游戏.现在需要调整摄像机的FOV,这使我与CardBoard.cs中的名为"mockFieldOfView"的变量进行交互.在Unity编辑器中调整该值很好,但是一旦我为Android构建了一个版本,它根本就不会生效.我无法弄清楚这个问题.任何想法或建议将不胜感激.

I am developing a sniper game for android using Google card board unity SDK. Now there is the need to tweak the camera's FOV which leads me to interact a variable named 'mockFieldOfView' in CardBoard.cs. Tweaking that value in the Unity editor is fine but as soon as I make a build for Android it doesn't take effect at all. I'm unable to figure out the issue. Any idea or suggestion would be highly appreciated.

为较晚的回复表示歉意,因此,您可以在此处

Apologize for the late reply, so ouflak you can see complete Cardboard.cs here Cardboard.cs

推荐答案

您不想更改"mockFieldOfView".这只会影响编辑器中的FOV.您要更改的值是StereoController上的"matchMonoFOV".您还必须在StereoController上设置一个"CenterOfInterest"游戏对象.它将使立体声FOV尝试匹配主摄像机(或具有StereoController脚本的任何摄像机)上的FOV.

You don't want to change "mockFieldOfView". That only affects the in-editor FOV. The value you want to change is "matchMonoFOV" on the StereoController. You also have to set a "CenterOfInterest" game object on the StereoController. It makes the stereo FOV attempt to match the FOV on the Main Camera (or whichever camera has the StereoController script).

请参见 StereoController.cs

更新:Cardboard SDK v0.4.5支持您的用例.使用"matchByZoom"并在StereoController的摄像机上设置所需的FOV.不需要兴趣中心.

Update: v0.4.5 of Cardboard SDK supports your use case. Use "matchByZoom" and set the FOV you want on the StereoController's camera. No center of interest is needed.

这篇关于无法更改Google纸板相机的FOV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆