英文:
Does camera.lookAt() still exist in THREE.js?
问题
我正在浏览关于如何设置相机的帖子,其中许多提到了 lookAt
函数。当我去查阅 THREE.js 文档时,我找不到这个方法。它去哪了?在 lookAt
函数的位置上,我应该做什么?
我只找到了针对 Object3D
的 lookAt
方法:https://threejs.org/docs/#api/en/core/Object3D.lookAt,但这并不符合需求。
英文:
I was browsing posts about how to set up the camera and many of them mentioned the lookAt
function. When I go to THREE.js documentation I can't find the method. Where did it go? What should I do in place of the lookAt
function?
I only found a lookAt
method for Object3D
: https://threejs.org/docs/#api/en/core/Object3D.lookAt, which does not satisfy the purpose.
答案1
得分: 0
Camera继承自Object3D。因此,它继承了所有它的方法。
而且,透视相机(PerspectiveCamera)和正交相机(OrthographicCamera)也是如此,它们从基本Camera类继承。
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论