ThreeJS camera.lookAt() has no effect, is there something I'm doing wrong?

前端 未结 6 409
半阙折子戏
半阙折子戏 2021-02-05 02:13

In Three.js, I want a camera to be pointed at a point in 3D space.

For this purpose, I tried using the camera.lookAt function like so:

camer         


        
6条回答
  •  逝去的感伤
    2021-02-05 02:30

    Looking at the source code of THREE.TrackballControls, I figured out that I can make the camera look where I want by setting trackballControls.target to the THREE.Vector3 I want it to look at, and then rerendering the scene.

提交回复
热议问题