TrackballControl for Objects #1541
Unanswered
philworthy
asked this question in
Q&A
Replies: 2 comments 2 replies
-
this is not a library or a module, just a blob of code. but in any way, if it works in threejs it works in r3f, too: https://codesandbox.io/s/basic-demo-forked-xsehy?file=/src/App.js |
Beta Was this translation helpful? Give feedback.
1 reply
-
Thank you so much @drcmda ! 👍 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been looking for a way to spin an object around with my mouse, exactly like TrackballControls, but controlling the object, not the camera (this is necessary for instance if you want some objects in the scene to remain static)
eg. TrackballObjectControls
There is a library called spin-controls that attempts to do this, but I've struggled to get it working inside react-three/fiber.
Note: If there is a better way to do this (ie. to use a regular TrackballControls and 'lock' some objects to the rotation of the camera so they appear static) that would also solve this need so any tips much appreciated (also tried and failed to get that working)
Thank you and amazing work with r3f!
Beta Was this translation helpful? Give feedback.
All reactions