Three.js Rotate objects inside of moving Object3D to always face the camera

后端 未结 1 1060
栀梦
栀梦 2020-12-22 12:33

I\'m somewhat new to Threejs was just wondering how to make moving mesh always face the camera in a scene. I have 100 meshes inside of a container Object3D, and am rotating

相关标签:
1条回答
  • 2020-12-22 13:15

    Object.lookAt() will not work correctly if the object has a parent that is rotated.

    The absolute easiest solution to your problem is to hold the parent object fixed and rotate the camera around the object instead.

    That way, Object.lookAt() will work as expected.

    Updated fiddle: http://jsfiddle.net/rZtJX/5/

    three.js r.57

    0 讨论(0)
提交回复
热议问题