Switch threejs controls ( from TrackBall to FlyControls and vice versa)

前端 未结 2 679
日久生厌
日久生厌 2020-12-05 21:21

What I am trying to achieve is to have two control modes, a free \"flying\" one, and an object-centered one (trackball) and with a button press seamlessly switch between the

2条回答
  •  庸人自扰
    2020-12-05 22:19

    Making a new camera is the easiest way to unbind all the keyboard/mouse events that were setup with the previous controls. If you don't do this you'll have orbitcontrols events fire with fly mode on.

提交回复
热议问题