Table of Contents

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
object
Object
Component
Behaviour
MonoBehaviour
InputAdapter
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

IsDragOrbiting

True while this adapter is actively drag-orbiting (its rotate gesture is held).

public virtual bool IsDragOrbiting { get; }

Property Value

bool

IsDragPanning

True while this adapter is actively drag-panning (its move gesture is held).

public virtual bool IsDragPanning { get; }

Property Value

bool

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. Adapters read their backend directly here, so avoid calling this on a disabled adapter (fx. a legacy adapter when only the New Input System is active).

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

bool

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 right), 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

float

ZoomInput

Continuous zoom axis.

public virtual float ZoomInput { get; }

Property Value

float

Methods

IsScreenPositionOverUI(Vector2)

public static bool IsScreenPositionOverUI(Vector2 screenPosition)

Parameters

screenPosition Vector2

Returns

bool

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()