当不是 (0,0,0) 指针锁定控制时,相机位置/旋转错误 [英] camera position / rotation wrong when not (0,0,0) pointer lock controls

查看:28
本文介绍了当不是 (0,0,0) 指针锁定控制时,相机位置/旋转错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我设置camera.position除了(0,0,0)之外的任何东西时,我的指针锁定控件旋转无处不在.整个场景变得疯狂.

when ever I set camera.position anything other than (0,0,0) my rotation with pointer lock controls is all over the place. The whole scene goes crazy.

如果我改变 yawObject 而不是相机的位置,它似乎可以工作.所以我想没关系,

It seems to work if I change the position of yawObject and not camera. So I guess that is ok,

如何更改指针锁定​​控件的默认旋转 - 我想从向右看.

How can i change the default rotation of pointer lock controls - I want to start by looking to the right.

谢谢.

推荐答案

controls.getObject().position.set( x, y, z);

这篇关于当不是 (0,0,0) 指针锁定控制时,相机位置/旋转错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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