Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Three JS: Orbit Controls and camera.up.set

I'm trying to get Orbit Controls to work when I set the camera to :

camera.up.set(0,0,1)

This ends up not orbiting properly, and some unanswered questions out there call out the issue: Three.js: way to change the up axis?

Can anyone provide information for how to change the rotation axis of the orbit?

like image 555
ekatz Avatar asked Oct 02 '22 11:10

ekatz


1 Answers

This was recently fixed . If you get the latest three.js dev version from https://github.com/mrdoob/three.js/tree/dev , you can just set camera.up and OrbitControls will behave accordingly.

like image 76
foobarbecue Avatar answered Oct 12 '22 00:10

foobarbecue