PICO Unity XR SDK
PXR_HandTracking Class Reference

Static Public Member Functions

static bool GetSettingState ()
 Gets whether hand tracking is enabled or disabled. More...
 
static ActiveInputDevice GetActiveInputDevice ()
 Gets the current active input device. More...
 
static bool GetAimState (HandType hand, ref HandAimState aimState)
 Gets the data about the pose of a specified hand, including the status of the ray and fingers, the strength of finger pinch and ray touch. More...
 

Member Function Documentation

◆ GetSettingState()

static bool GetSettingState ( )
static

Gets whether hand tracking is enabled or disabled.

Returns
  • true: enabled
  • false: disabled

◆ GetActiveInputDevice()

static ActiveInputDevice GetActiveInputDevice ( )
static

Gets the current active input device.

Returns
The current active input device:
  • HeadActive: HMD
  • ControllerActive: controllers
  • HandTrackingActive: hands

◆ GetAimState()

static bool GetAimState ( HandType  hand,
ref HandAimState  aimState 
)
static

Gets the data about the pose of a specified hand, including the status of the ray and fingers, the strength of finger pinch and ray touch.

Parameters
handThe hand to get data for:
  • HandLeft: left hand
  • HandRight: right hand
aimStateHandAimState contains the data about the poses of ray and fingers. If you use PICO hand prefabs without changing any of their default settings, you will get the following data:
public class PXR_Hand
{
// Whether the data is valid.
public bool Computed { get; private set; }
// The ray pose.
public Posef RayPose { get; private set; }
// Whether the ray was displayed.
public bool RayValid { get; private set; }
// Whether the ray touched.
public bool RayTouched { get; private set; }
// The strength of ray touch.
public float TouchStrengthRay { get; private set; }
Returns
  • true: success
  • false: failure