Studio: scene view gyroscopic gizmo (camera orientation widget)
Goal
Add a gyroscopic gizmo to the top-right corner of the Scene View that represents the relative rotation of the camera. Generally a cube/box shape with labeled faces (X/Y/Z). Clicking a face positions the camera to align with that axis, maintaining the current view center (the object/point in focus stays visible).
Context / integration points
- Scene view is the main 3D viewport in the Studio.
- A camera orientation gizmo is a standard feature in modeling tools (Blender, Unity, Unreal).
- Currently there is no visual indicator of the current camera orientation.
- Clicking a face should smoothly (or instantly) snap the camera to look along that axis.
Design
- Render a small 3D gizmo in the top-right corner of the Scene View (overlay, not part of the 3D scene).
- Shape: a cube with three colored/lettered faces visible:
- X (red) — right face
- Y (green) — up face
- Z (blue) — forward face
- The gizmo rotates to match the camera's current orientation in world space.
- Clicking the X face aligns the camera to look along the X axis (world or local, TBD).
- Clicking the Y face aligns to look down along Y.
- Clicking the Z face aligns to look along Z.
- The camera position is adjusted to maintain the same focus point (the object at the center of the view stays visible).
- Optional: clicking the center cube toggles between perspective and orthographic views.
- Optional: smooth animation when snapping (configurable).
Tasks
- Design and implement the gizmo 3D mesh (or billboard with 3D effect)
- Implement face picking / hit detection for click events
- Implement camera snapping logic (position + rotation to align with axis)
- Ensure the focus point is preserved during snapping
- Add smooth animation option (lerp camera to target)
- Integrate as an overlay in the Scene View
- Test with various camera angles and zoom levels
Acceptance criteria
- Gizmo is visible in the top-right corner of the Scene View.
- Gizmo rotates in real-time to match the camera.
- Clicking a face snaps the camera to look along that axis.
- The focus object/point remains centered after snapping.
- Works for perspective and orthographic camera modes.
Dependencies
Scene View rendering infrastructure.
Out of scope
- Additional gizmo shapes (sphere, cone, etc.).
- Custom axis labels.
- Orbit/pan/zoom via gizmo dragging.