Pico Unity XR SDK
PXR_Input Class Reference

Public Types

enum  ControllerDevice { G2 = 3 , Neo2 , Neo3 , NewController = 10 }
 
enum  Controller { LeftController , RightController }
 

Static Public Member Functions

static Controller GetDominantHand ()
 Gets the current dominant controller. More...
 
static void SetDominantHand (Controller controller)
 Sets a controller as the dominant controller. More...
 
static void SetControllerVibration (float strength, int time, Controller controller)
 Sets controller vibration, including vibration amplitude and duration. More...
 
static ControllerDevice GetControllerDeviceType ()
 Gets the device model. More...
 
static bool IsControllerConnected (Controller controller)
 Gets controller's connection status. More...
 
static void SetControllerOriginOffset (Controller controller, Vector3 offset)
 Sets the offset of the controller's display position to its real position. More...
 
static Quaternion GetControllerPredictRotation (Controller controller, double predictTime)
 Gets the predicted rotation of a specified controller after a specified time. More...
 
static Vector3 GetControllerPredictPosition (Controller controller, double predictTime)
 Gets the predicted position of a specified controller after a specified time. More...
 

Member Enumeration Documentation

◆ ControllerDevice

Enumerator
G2 
Neo2 
Neo3 
NewController 

◆ Controller

enum Controller
Enumerator
LeftController 
RightController 

Member Function Documentation

◆ GetDominantHand()

static Controller GetDominantHand ( )
static

Gets the current dominant controller.

Returns
The current dominant controller:
  • LeftController: left controller
  • RightController: right controller

◆ SetDominantHand()

static void SetDominantHand ( Controller  controller)
static

Sets a controller as the dominant controller.

Parameters
controllerThe controller to be set as the dominant controller:
  • 0: left controller
  • 1: right controller

◆ SetControllerVibration()

static void SetControllerVibration ( float  strength,
int  time,
Controller  controller 
)
static

Sets controller vibration, including vibration amplitude and duration.

Parameters
strengthVibration amplitude. The valid value ranges from 0 to 1. The greater the value, the stronger the vibration amplitude. To stop controller vibration, call this function again and set this parameter to 0.
timeVibration duration. The valid value ranges from 0 to 65535 (in milliseconds).
controllerThe controller to set vibration for:
  • 0: left controller
  • 1: right controller

◆ GetControllerDeviceType()

static ControllerDevice GetControllerDeviceType ( )
static

Gets the device model.

Returns
The device model. Enumerations:
  • G2
  • Neo2
  • Neo3
  • NewController


◆ IsControllerConnected()

static bool IsControllerConnected ( Controller  controller)
static

Gets controller's connection status.

Parameters
controllerThe controller to get the connection status for:
  • 0: left controller
  • 1: right controller
Returns
The connection status of the specified controller:
  • true: connected
  • false: not connected

◆ SetControllerOriginOffset()

static void SetControllerOriginOffset ( Controller  controller,
Vector3  offset 
)
static

Sets the offset of the controller's display position to its real position.

Parameters
handThe controller to set an offset for:
  • 0: left controller
  • 1: right controller
offsetThe offset (in meters).

◆ GetControllerPredictRotation()

static Quaternion GetControllerPredictRotation ( Controller  controller,
double  predictTime 
)
static

Gets the predicted rotation of a specified controller after a specified time.

Parameters
handThe controller to get the predicted rotation for:
  • 0: left controller
  • 1: right controller
predictTimeThe time for prediction (in milliseconds).
Returns
The predicted rotation value.

◆ GetControllerPredictPosition()

static Vector3 GetControllerPredictPosition ( Controller  controller,
double  predictTime 
)
static

Gets the predicted position of a specified controller after a specified time.

Parameters
handThe controller to get the predicted position for:
  • 0: left controller
  • 1: right controller
predictTimeThe time for prediction (in milliseconds).
Returns
The predicted position value.

The documentation for this class was generated from the following file: