◆ ControllerDevice
Enumerator |
---|
G2 | |
Neo2 | |
Neo3 | |
NewController | |
◆ Controller
Enumerator |
---|
LeftController | |
RightController | |
◆ GetDominantHand()
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
-
controller | The 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
-
strength | Vibration 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 . |
time | Vibration duration. The valid value ranges from 0 to 65535 (in milliseconds). |
controller | The controller to set vibration for:
-
0 : left controller
-
1 : right controller
|
◆ GetControllerDeviceType()
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
-
controller | The 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
-
hand | The controller to set an offset for:
-
0 : left controller
-
1 : right controller
|
offset | The 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
-
hand | The controller to get the predicted rotation for:
-
0 : left controller
-
1 : right controller
|
predictTime | The 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
-
hand | The controller to get the predicted position for:
-
0 : left controller
-
1 : right controller
|
predictTime | The time for prediction (in milliseconds). |
- Returns
- The predicted position value.
The documentation for this class was generated from the following file:
- E:/OpenXR_UnityXR2-2.0.5_B81-20220523(2)/Features/PXR_Input.cs