Skip to main content

OpenXRWrapper

A class in Root.Township, the global namespace.

Receives OpenXR input action callbacks and turns them into per-hand OpenXRControllerInput state. Implements the callback interfaces of all four playing action maps; client only.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private static Logger loggerNLog logger for the class.

Properties​

MemberWhat it is
OpenXRControllerInput LeftInput { get; }Input state for the left controller.
OpenXRControllerInput RightInput { get; }Input state for the right controller.

Methods​

MemberWhat it is
void OnAngularVelocity(InputAction.CallbackContext context)Stores the controller's angular velocity in its pose.
void OnAssistGrab(InputAction.CallbackContext context)Sets the grab assist button state.
void OnDirectionInput(InputAction.CallbackContext context)Uses one stick for turning speed, gestures and walking, and sets snap turn and send-item left or right from a sideways push.
void OnGestures(InputAction.CallbackContext context)Stores the gesture stick value.
void OnGrabStrength(InputAction.CallbackContext context)Stores grip force and sets hard grab when above 0.5.
void OnInteract(InputAction.CallbackContext context)Sets the grab state from the grip and mirrors it into the release-toggle-grab state.
void OnItemLeft(InputAction.CallbackContext context)Sets the send-item-left state.
void OnItemRight(InputAction.CallbackContext context)Sets the send-item-right state.
void OnJoystickDpad(InputAction.CallbackContext context)A sideways push sets snap turn and send-item left or right. Centring the stick does not clear them.
void OnLockForGesture(InputAction.CallbackContext context)Sets the lock-for-gestures state.
void OnMetaMenu(InputAction.CallbackContext context)Sets the menu button state.
void OnPicoAssistGrab(InputAction.CallbackContext context)Sets grab assist from the Pico trigger. Unlike the others it reacts to every phase, not just performed.
void OnPose(InputAction.CallbackContext context)Stores the full controller pose.
void OnPosition(InputAction.CallbackContext context)Stores the controller position in its pose.
void OnReleaseToggleGrab(InputAction.CallbackContext context)Sets the release-toggle-grab state.
void OnRotation(InputAction.CallbackContext context)Stores the controller rotation in its pose.
void OnSecondaryInteract(InputAction.CallbackContext context)Feeds the double-tap check and sets grab assist and long photo states together.
void OnSkeleton(InputAction.CallbackContext context)Does nothing with the value.
void OnSmoothLocomotion(InputAction.CallbackContext context)Stores the walking stick value.
void OnSmoothRotation(InputAction.CallbackContext context)Stores turn speed and gestures, and sets snap turn and send-item left or right from a sideways push.
void OnSqueeze(InputAction.CallbackContext context)Stores the grip axis.
void OnSwipeMotion(InputAction.CallbackContext context)Stores the swipe position and marks that a swipe happened.
void OnSwipeTouch(InputAction.CallbackContext context)Sets the swipe touch state.
void OnTakeScreenShotLong(InputAction.CallbackContext context)Sets whether the long photo button is held.
void OnTeleport(InputAction.CallbackContext context)Sets the teleport button state.
void OnToggleGrab(InputAction.CallbackContext context)Feeds the trigger into the double-tap check used for toggle grab.
void OnToggleGrabDoubleTap(InputAction.CallbackContext context)Sets the toggle grab state directly.
void OnToggleRun(InputAction.CallbackContext context)Sets the run toggle state.
void OnTouchingIndexAxis(InputAction.CallbackContext context)Marks the index finger as touching the trigger.
void OnTouchingThumb(InputAction.CallbackContext context)Marks the thumb as touching the controller face.
void OnTouchingTriggerButton(InputAction.CallbackContext context)Marks the index finger as touching the trigger.
void OnTriggerAxis(InputAction.CallbackContext context)Stores the trigger axis as the secondary axis.
void OnTurnLeft(InputAction.CallbackContext context)Sets the snap turn left state.
void OnTurnRight(InputAction.CallbackContext context)Sets the snap turn right state.
void OnVelocity(InputAction.CallbackContext context)Stores the controller velocity in its pose.
1 private and internal method
MemberWhat it is
private bool GetInput(InputAction.CallbackContext context, out OpenXRControllerInput input)Returns the left or right controller input for an input action callback, based on the device. Returns false unless the action is in the performed phase.

Used in​

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