Vertx » Unity – Improved SceneView Camera

Unity – Improved SceneView Camera



The FreeCamera solution comes with two modes for operating the scene-view camera in Unity: Free (Trackball) and 6Axis.

Free (Trackball):

Inspired by Modo’s trackball camera I took a day to write a Unity solution. The trackball should override Unity’s scene camera rotation when enabled.

Describing how it works is a little hard; there’s a cross centred in the middle of the viewport that gets weaker the closer to the corners you go. If you’re in the middle of the vertical part you can rotate over and under by dragging down and up. If you’re in the middle of the horizontal part you can rotate left and right. Dragging around the edges will roll the camera. All these work in tandem, increasing and decreasing based on the distances from the cross lines and edges.


Six-axis mode realigns the scene-view’s “up” to an appropriate axis when the camera tilts over 90 degrees. This effectively creates a default scene camera that can view the scene from any direction. Still incapable of rolling the camera in use, but able to roll when you look “too far” up or down.

Interestingly when changing axes close to 45degrees you may feel like there’s issues of intention vs reality, this is an issue I am grappling with in an FPS I’m making that uses the same camera idea.

Using trackball rotation is helpful for games where you want to see the world from a different perspective, instead of Y always being upwards. 6Axis is an easier to grasp version of a freed-perspective camera. Hopefully it works out for you, and if it does I would be happy to hear about improvements anyone makes!

The current implementation needs work, but you can download it here. Open it at Tools>Vertx>FreeCamera and there should be a toggle button below your XYZ gizmo.

  • 25/11/15: Fixed silly unremoved statement disabling the camera in play mode
  • 30/11/15: Multiple scene view support. OSX support. Fixed disabling window not resetting camera. Fixed unnecessary repainting of scene.
  • 01/12/15: Cleaned up multiple scene view support. Cleaned up rotation resets.
  • 13/12/15: Added 6-axis mode
  • 29/12/15: Fixed conflicts with plugins that rely on camera or events that are Used by FreeCamera. Reordered modifier cases to fix edge-case input issues.
  • 01/06/17: Rewrote camera implementation. Improved button drawing. Improved free-mode’s trackball to be round and have a hardcoded size setting. Improved loading and callback sorting. Hopefully added high DPI support. Removed menu-based disable, I might re-enable this later.
  • Hopefully soon: Fly cam support and right-click pan support

It’s important to note that you should toggle FreeCamera to OFF before removing the extension.

The geometry in the 6Axis video was created using SabreCSG.

Sorry, the comment form is closed at this time.