Namespace Goehler.OrbitalCam

Classes

ButtonEventTrigger

Add this to a UI element like fx. a Button. The script will now trigger its OnButtonHeld action every frame while the button is being held down. It will also trigger its OnButtonClicked event on mouse button up.

InputAdapter

Base class for input adapters. Each concrete subclass reads from one device class (keyboard, mouse, touch, UI buttons, New Input System) and exposes a uniform axis set.

InputAdapterAggregator

Combines several InputAdapter instances into one. Sums axis inputs (clamped to magnitude 1), accumulates deltas, and returns the first available pointer position and edge-scroll value. The camera holds one of these and queries it each frame.

KeyBindingSource

Polymorphic source of a keyboard binding result. Subclasses define how the binding evaluates; the keyboard adapter only depends on this contract, so swapping SingleKeyBinding for an array-of-bindings type later is a non-breaking change.

LegacyKeyboardInputAdapter

Reads keyboard input through the Legacy Input Manager and feeds it to the camera. Bind keys for move, rotate, tilt, stepped rotate, and zoom in the Inspector.

LegacyMouseInputAdapter

Reads mouse input through the Legacy Input Manager and feeds it to the camera. Drag-to-pan, drag-to-rotate, mouse-wheel zoom, and optional edge-scrolling.

LegacyTouchInputAdapter

Reads touch input through the Legacy Input Manager and feeds it to the camera. Drag-to-pan, drag-to-rotate, and pinch zoom — with configurable finger counts per gesture.

NewInputSystemAdapter

Reads input through Unity's New Input System and feeds it to the camera. One component replaces the three legacy keyboard/mouse/touch adapters when running on the Input System Package. Bind actions through the assigned UnityEngine.InputSystem.InputActionAsset.

OrbitalCameraSystem

The main script in the OrbitalCam system. Holds most of the properties that can be tweaked, and is the entry point for the Public API.

SingleKeyBinding

V1 binding: one key plus zero or more strict-match modifiers. Fires only when the held modifier set exactly equals Modifiers.

UIButtonsInputAdapter

Reads on-screen UI button presses and feeds them to the camera. Backend-independent — works alongside either the Legacy or New Input System components. Each button needs a ButtonEventTrigger dragged into the matching slot.

Structs

OrbitalCameraState

Snapshot of an OrbitalCameraSystem's state: position, Y-rotation, tilt, and zoom. Capture with GetState() and restore with SetState(OrbitalCameraState). Works with UnityEngine.JsonUtility for save games or persistent camera state.

Enums

EasingType

Easing curve to apply when animating camera movements through the public API.

KeyModifiers

Modifier keys recognized by SingleKeyBinding. Strict match: a binding fires only when the held modifier set exactly equals its required modifiers.

MouseButton

Enumeration of mouse buttons. Used when mapping the mouse to the movement/rotation actions.

PinchGesture

Describing a pinch gesture by the number of fingers involved. Pinch requires at least two contact points, so OneFinger is excluded by design.

TouchGesture

Describing a touch gesture by the number of fingers involved. Used when mapping touch gestures to the movement/rotation actions.

ZoomMethod

Describing a zoom method to be used while zooming.