NRSDKApiForUnity
Classes
XRXREALXREALVirtualController
Unity.XR.XREAL.XREALVirtualController
Inheritance diagram for Unity.XR.XREAL.XREALVirtualController:
Unity.XR.XREAL.SingletonMonoBehaviour< T >

Public Member Functions

void SendHapticButton (XREALButtonType buttonType, bool press)
 
void SendHapticAxis (XREALButtonType buttonType, float axisX, float axisY)
 
void SendHapticAxisEnd (XREALButtonType buttonType)
 

Properties

InputDevice Controller [get]
 
- Properties inherited from Unity.XR.XREAL.SingletonMonoBehaviour< T >
static T Singleton [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from Unity.XR.XREAL.SingletonMonoBehaviour< T >
static T CreateSingleton ()
 

Detailed Description

A singleton class for interacting with the XREAL Virtual Controller. Provides functionality to send haptic feedback based on button presses and touchpad interactions.

Member Function Documentation

◆ SendHapticAxis()

void Unity.XR.XREAL.XREALVirtualController.SendHapticAxis ( XREALButtonType buttonType,
float axisX,
float axisY )

Sends haptic feedback for touchpad interactions by specifying the 2D axis position.

Parameters
buttonTypeThe type of the button (e.g., Primary2DAxis).
axisXThe normalized X-axis value of the touchpad (-1 to 1).
axisYThe normalized Y-axis value of the touchpad (-1 to 1).

◆ SendHapticAxisEnd()

void Unity.XR.XREAL.XREALVirtualController.SendHapticAxisEnd ( XREALButtonType buttonType)

Sends a signal to end haptic feedback for a touchpad interaction.

Parameters
buttonTypeThe type of the button (e.g., Primary2DAxis).

◆ SendHapticButton()

void Unity.XR.XREAL.XREALVirtualController.SendHapticButton ( XREALButtonType buttonType,
bool press )

Sends haptic feedback for button press or release events.

Parameters
buttonTypeThe type of the button (e.g., TriggerButton, GripButton).
pressIndicates whether the button is pressed (true) or released (false).