Table of Contents

Class NewInputSystemAdapter

Namespace
Goehler.OrbitalCam
Assembly
Goehler.OrbitalCam.Runtime.dll

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.

[AddComponentMenu("Goehler Studios/Orbital Cam/Input/New Input System")]
public class NewInputSystemAdapter : InputAdapter
Inheritance
object
Object
Component
Behaviour
MonoBehaviour
NewInputSystemAdapter
Inherited Members

Properties

EdgeScrollInput

Screen-edge scroll direction. X / Y in [-1, 1]. Zero when no edge is active.

public override Vector2 EdgeScrollInput { get; }

Property Value

Vector2

MoveDelta

Pointer-drag move delta in world units, accumulated since the last Sample().

public override Vector3 MoveDelta { get; }

Property Value

Vector3

MoveInput

Continuous move axis (e.g. WASD, left stick). X = strafe, Y = forward.

public override Vector2 MoveInput { get; }

Property Value

Vector2

PointerPosition

Current pointer position in screen pixels. Only meaningful when PointerPositionAvailable is true.

public override Vector2 PointerPosition { get; }

Property Value

Vector2

PointerPositionAvailable

True when PointerPosition is valid (pointer inside the game window, touch active, etc.).

public override bool PointerPositionAvailable { get; }

Property Value

bool

RotateDelta

Pointer-drag rotate delta in degrees, accumulated since the last Sample(). X = rotate, Y = tilt.

public override 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 override 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 override Vector2 RotateStepInput { get; }

Property Value

Vector2

ZoomDelta

Wheel or pinch zoom delta, accumulated since the last Sample().

public override float ZoomDelta { get; }

Property Value

float

ZoomInput

Continuous zoom axis.

public override float ZoomInput { get; }

Property Value

float

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 override void Sample()