Unity.XR.XREAL.XREALVirtualController
Inheritance diagram for Unity.XR.XREAL.XREALVirtualController:
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] |
static T | Singleton [get] |
Additional Inherited Members | |
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
-
buttonType The type of the button (e.g., Primary2DAxis). axisX The normalized X-axis value of the touchpad (-1 to 1). axisY The 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
-
buttonType The 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
-
buttonType The type of the button (e.g., TriggerButton, GripButton). press Indicates whether the button is pressed (true) or released (false).