2

I want to change from TrackBall to Fly Controls and, although I followed the answer provided on Switch threejs controls ( from TrackBall to FlyControls and vice versa) , I couldn't get it to work properly.

If I "rotate" the model using the trackball (by clicking on it and moving the mouse), when I switch to fly I may lose sight of the object.

My guess is that it's not enough to save the position/rotation of the previous camera, but I also need to save something else, like the world matrix position/rotation. But dunno if it's the correct way.

Example here:

http://webgl.zelda.com.br/index2.html?m=Ghirahim

http://webgl.zelda.com.br/index2.html?m=Zelda

4

0 回答 0