Skip to content

Single Hand Grip Animator

eisclimber edited this page Jan 18, 2024 · 1 revision

Single Hand Grip Animator

class in ExPresSXR.Rig / Extends MonoBehavior
Component added via Component Menu

Description

Uses an (required) Animator in the same GO to animate grabbing and pinching inputs from a controller. Automatically queries for either a left or a right controller.
The Animator should have the parameters Trigger and Grip. If it handles both hands _triggerPrefix can be used to differentiate left and right hands (E.g. having parameters L_Trigger and R_Trigger with prefixes L_ and R_).

Members

Editor Properties

  • ControllerSide controllerHand = ControllerSide.Right;: Which hand is used for this controller. Either Left or Right.
  • string _triggerPrefix: Prefix that is added to the Animator's parameters to allow both hands to be handled from the same Animator.

Constants

  • InputDeviceCharacteristics CONTROLLER_BASE_CHARACTERISTICS = InputDeviceCharacteristics.Controller | InputDeviceCharacteristics.HeldInHand: Base InputDeviceCharacteristics for an XR Controller. With that it only must be differentiated between left and right.

Enums

  • ControllerSide: Used to differntiate between left and right hand controllers.

ExPresS XR Wiki

Tutorial Pages

Code Documentation

Clone this wiki locally