Right Side Up - ArcBall COMP
Killer component @lucasm
cool, thanks. I’ve wanted the rotation to be around the center of screen vs fixed to the object 0 0 0 in ArcBall (and i’d also want rotating around where the cursor is).
awesome, this is fab
@LUCASM thx so much for sharing this one! So much better then that palette version.
One question. Moving the camera left/right and up/down feels really great, but when I use MMB /mousewheel to move in Z it seems i can’t go further then z = 0 ? Is this a bug or is that component not intended to be used to “travel freely” in 3D space?
Hey thank you!
I think with cam nav there’s generally two schools of thought / UX, 1) the camera should zoom closer to a point, and the closer it gets to that point, the smaller the increments get (sorta logarithmic) and 2) scroll wheel just steps through space forwards or backwards in the direction it’s facing.
I’ve also seen hybrid approaches in maya for ex, where if you keep zooming past a certain threshold, it assumes you want to move the camera forward, and it pops the focal point forwards by another 100 units or something like that.
As far as this comp, it is intentional - I took approach 1), the camera currently doesn’t go past the “focal point”. I wanted to keep it constrained that way since I also had a function to home the camera to a new object or bounding box.
Great component! We’ve actually been working on a new camera component ourselves for the next experimental release that aims to fully duplicate the new geometry viewer camera.
We’re currently just passing it around internally to get some feedback, so it’s interesting to hear how you guys feel about some of these camera issues.
At the moment, our new zoom (dolly) scales according to the distance from the pivot as well, but I added a small minimum distance so that once you approach the pivot and keep zooming you can slowly move past it.
However, our new zoom is also a little different since it’s based on the cursor position rather than the rotation pivot e.g. the camera zooms towards (or away) from wherever the cursor is like it does in the network view.
We’ve also added a few more ways to set the pivot like the pick position (geometry under the cursor) or the center of the selected objects in addition to just the center of the viewport.
wow! very cool @robmc looking forward to playing around with the new official version when it’s ready.
Is this going to work similar to the arcball we have now, where it’s based on something like the tdu.arcball class?
yes, there is a new python class (currently just called tdu.camera) that acts as a wrapper for our internal camera code. It maintains the camera in c++ using quaternions and then has functions for setting the pivot and all of the basic movements e.g. zoom, pan, scroll, walk, look, etc