I'm doing mechanical CAD where the "up" is the Z axis (positive towards the sky), but orbitcontrol assumes that Y is the sky. I'm not really willing to change the global axes labeling in my code because it would be a nightmare in the development to jump between mechanical thinking and three.js thinking.
Is there a smart way to change the rotation axis of the control? Or some kind of very local way to change the axes just for the camera/control sub-system?
The version of OrbitControls
in the three.js dev branch will accommodate any camera.up
direction.
If you want the camera to rotate around the z-axis, with the z-axis "up", just do this:
camera.up.set( 0, 0, 1 );
three.js r.67dev
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With