I have always been a bit off put by the arcball’s ability to rotate around it’s local Z axis, and with my own viewport interaction heavy programming a reusable component made sense personally, so thought I’d get it out there for others to make use of.
The main benefits of this component are:
- Camera will stay “right side up”, which if you’ve used any cad or animation software, is typically how cameras are setup.
- you can fade between orthographic and perspective at any time, and the transition will be fluid and comparable to each other.
- You can choose from a variety of modifier keys(on,off,shift,ctrl,alt) for each of the 3 interaction types (orbit,pan,dolly) allowing you to disable or enable certain camera controls, or make them only accessible if a modifier key was held down on click.