Class InputAdapter
- Namespace
- Goehler.OrbitalCam
- Assembly
- Goehler.OrbitalCam.Runtime.dll
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.
public abstract class InputAdapter : MonoBehaviour
- Inheritance
-
objectObjectComponentBehaviourMonoBehaviourInputAdapter
- Derived
Properties
EdgeScrollInput
Screen-edge scroll direction. X / Y in [-1, 1]. Zero when no edge is active.
public virtual Vector2 EdgeScrollInput { get; }
Property Value
- Vector2
IsAvailable
True when the adapter can produce input. Return false to skip the adapter for this frame (e.g. device missing, focus lost).
public virtual bool IsAvailable { get; }
Property Value
MoveDelta
Pointer-drag move delta in world units, accumulated since the last Sample().
public virtual Vector3 MoveDelta { get; }
Property Value
- Vector3
MoveInput
Continuous move axis (e.g. WASD, left stick). X = strafe, Y = forward.
public virtual Vector2 MoveInput { get; }
Property Value
- Vector2
PointerPosition
Current pointer position in screen pixels. Only meaningful when PointerPositionAvailable is true.
public virtual Vector2 PointerPosition { get; }
Property Value
- Vector2
PointerPositionAvailable
True when PointerPosition is valid (pointer inside the game window, touch active, etc.).
public virtual bool PointerPositionAvailable { get; }
Property Value
RotateDelta
Pointer-drag rotate delta in degrees, accumulated since the last Sample(). X = rotate, Y = tilt.
public virtual Vector2 RotateDelta { get; }
Property Value
- Vector2
RotateInput
Continuous rotate-and-tilt axis (e.g. Q/E + F/C, right stick). X = rotate, Y = tilt.
public virtual Vector2 RotateInput { get; }
Property Value
- Vector2
RotateStepInput
Drain-on-read: returns the accumulated step delta in degrees since the last read and resets internal state to zero. X = rotate steps (positive left), Y = tilt steps (positive up).
public virtual Vector2 RotateStepInput { get; }
Property Value
- Vector2
ZoomDelta
Wheel or pinch zoom delta, accumulated since the last Sample().
public virtual float ZoomDelta { get; }
Property Value
ZoomInput
Continuous zoom axis.
public virtual float ZoomInput { get; }
Property Value
Methods
Sample()
Called once per frame by the camera before any axis getter is read. Pull from the device source here and cache results for the getters.
public abstract void Sample()