A-frame js camera rotation with look-controls [closed]

谁说胖子不能爱 提交于 2021-02-20 03:41:07

问题


I am trying to rotate camera with look-controls.Camera is rotating fine without look-controls.Can somebody tell me how can i rotate camera with look-controls?


回答1:


You'll need to remove or disable look-controls if you're overriding camera rotation manually.

You can remove the component temporarily with el.removeAttribute('look-controls') and add the component again afterward.

Or use el.setAttribute('look-controls', {enabled: false}) to disable the component.



来源:https://stackoverflow.com/questions/39579380/a-frame-js-camera-rotation-with-look-controls

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