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

前端 未结 6 408
半阙折子戏
半阙折子戏 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:29

    Yes Please beware... It seems that having THREE.TrackballControls or THREE.OrbitControls seems to override the camera.lookAt function as your are passing in your camera when you instantiate an instance of the controls. You might want to get rid of the controls and then performing camera.lookAt() or tween your camera some other way to verify that the controls are having a overriding effect on your Camera. I googled for a while why camera.lookat() seemed to have no effect.

提交回复
热议问题