Skip to main content

OpenXRControllerInput

A class in Root.Township, the global namespace.

Raw input state for one OpenXR controller, filled by OpenXRWrapper from Input System callbacks and read by OpenXRInputController.

Constructors​

MemberWhat it is
OpenXRControllerInput()Creates an OpenXRControllerInput with default values.

Fields​

MemberWhat it is
bool isTouchingThumbWhether the thumb is touching the thumb button or stick. Drives the hand pose.
bool isTouchingTriggerWhether the finger is touching the trigger. Drives the hand pose.
bool longPhotoIsPressedWhether the photo button is held. Used to work out TakePhoto.
PoseState poseLatest tracked pose of the controller (position, rotation, velocity).
3 private and internal fields
MemberWhat it is
private const float doubleTapSpeedSeconds allowed between taps for a double tap (1).
private float doubleTapTargetReal time when the double tap window ends, or -1 when no tap is waiting.
private bool wasTappingTap state from the last CalculateDoubleTap call.

Methods​

MemberWhat it is
void CalculateDoubleTap(bool isTapping)Sets ToggleGrab true when a second tap starts within a second of the first.

Used in​

Members of other types that take, return or hold a OpenXRControllerInput: