VR常用方法(Pico_API)
手柄
介绍 | 方法 |
判断按钮是否按住 | Pvr_UnitySDKAPI.Controller.UPvr_GetKey() |
判断按键是否按下 | Pvr_UnitySDKAPI.Controller.UPvr_GetKeyDown() |
判断按键是否抬起 | Pvr_UnitySDKAPI.Controller.UPvr_GetKeyUp() |
判断按键是否被长按 | Pvr_UnitySDKAPI.Controller.UPvr_GetKeyLongPressed() |
判断按键是否按下抬起了一次 | Pvr_UnitySDKAPI.Controller.UPvr_GetKeyClick() |
方向键(摇杆)
介绍 | 方法 |
判断Joystick键是否向上 | Pvr_UnitySDKAPI.Controller.UPvr_GetJoystickUp() |
判断Joystick键是否向下 | Pvr_UnitySDKAPI.Controller.UPvr_GetJoystickDown() |
判断Joystick键是否向左 | Pvr_UnitySDKAPI.Controller.UPvr_GetJoystickLeft() |
判断Joystick键是否向右 | Pvr_UnitySDKAPI.Controller.UPvr_GetJoystickRight() |
交互
Neo2手柄的振动接口 | Pvr_UnitySDKAPI.Controller.UPvr_VibrateNeo2Controller() |
获取手柄连接状态 | Pvr_UnitySDKAPI.Controller. UPvr_GetControllerBindingState() |
初始化电量音量亮度服务 | Pvr_UnitySDKAPI.VolumePowerBrightness.UPvr_InitBatteryVolClass() |
开启音量服务 | Pvr_UnitySDKAPI.VolumePowerBrightness.UPvr_StartAudioReceiver() |
关闭音量服务 | Pvr_UnitySDKAPI.VolumePowerBrightness.UPvr_StopAudioReceiver() |
初始化距离传感器 | Pvr_UnitySDKAPI. Sensor. UPvr_InitPsensor() |
获得头戴距离传感器的状态 | Pvr_UnitySDKAPI. Sensor. UPvr_GetPsensorState() |
Pico Neo 2:
按键 | 输入事件 | ||
---|---|---|---|
Pvr_KeyCode.HOME | |||
Pvr_KeyCode.APP | |||
Pvr_KeyCode.TRIGGER | |||
| |||
Pvr_KeyCode.X(手柄0) | |||
Pvr_KeyCode.Y(手柄0) | |||
Pvr_KeyCode.A(手柄1) | |||
Pvr_KeyCode.B(手柄1) | |||
Pvr_KeyCode.TOUCHPAD |