Allow inversion of OrbitControls
See original GitHub issueIt would be really helpful if somehow I could invert the OrbitControls, optionally changing the following function:
https://github.com/mrdoob/three.js/blob/dev/examples/js/controls/OrbitControls.js#L431
to use either:
// Normal
rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientWidth * scope.rotateSpeed );
//Inverted
rotateLeft( 2 * Math.PI * -rotateDelta.x / element.clientWidth * scope.rotateSpeed );
and
// Normal
rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight * scope.rotateSpeed );
//Inverted
rotateUp( 2 * Math.PI * -rotateDelta.y / element.clientHeight * scope.rotateSpeed );
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
How to Orbitcontrol rotation side inversion - three.js forum
I need to change the orbitcontrol as inversion. i.e., If I rotate the object to right side using the OrbitControl, then the rotation...
Read more >Orbit Controls cannot initialize properly - three.js
All i want is to load an stl file and have some orbit controls to rotate around it. EDIT: Look at all these...
Read more >Three js, React Three Fiber, React Three Drei Tutorial 2022
We'd be creating our own Perspective camera, manipulate it, and then control it with OrbitControls, and bind the camera rotation with our ...
Read more >@react-three/drei - npm
Some controls allow you to set makeDefault , similar to, for instance, ... Drei currently exports OrbitControls , MapControls ...
Read more >Adding OrbitControls to React Three Fiber - Code Workshop
It is very configurable and can do some cool stuff like restrict the maximum angle of rotation, allow or disallow zooming, and lock...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@andrewhosgood You should be able to achieve what you want by negating
controls.rotateSpeed.However, I am trying to understand what you are doing that requires such a change. Is your scene a panorama, and is your camera viewing a sphere or box from the inside?
@WestLangley Yes, we are viewing a sphere from the inside. Setting the
controls.rotateSpeed = -1worked a treat! I missed this due to looking at the same problem for too long.I think you can close this issue now. Thank you all for your help!