camera position / rotation wrong when not (0,0,0) pointer lock controls

霸气de小男生 提交于 2019-12-12 04:41:30

问题


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.

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.

Thanks.


回答1:


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


来源:https://stackoverflow.com/questions/34324122/camera-position-rotation-wrong-when-not-0-0-0-pointer-lock-controls

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