C# Oculus Quest控制器按钮B、按钮Y、主手扳机和次手扳机未映射?
我无法在Unity上映射OVRInputModule中的4个按钮(按钮B、按钮Y、PrimaryHandTrigger和SecondaryHandTrigger)。但是,这些按钮在映射时适用于Oculus Rift控制器,但不适用于Oculus Quest touch控制器。为什么会发生这种情况?即使我使用它作为按钮或按钮,它仍然没有效果。当通过脚本映射时,触摸控制器上的所有其他按钮都能完美工作,但问题仅存在于这4个按钮 OVRINPUT模块:C# Oculus Quest控制器按钮B、按钮Y、主手扳机和次手扳机未映射?,c#,unity3d,oculus,oculusquest,C#,Unity3d,Oculus,Oculusquest,我无法在Unity上映射OVRInputModule中的4个按钮(按钮B、按钮Y、PrimaryHandTrigger和SecondaryHandTrigger)。但是,这些按钮在映射时适用于Oculus Rift控制器,但不适用于Oculus Quest touch控制器。为什么会发生这种情况?即使我使用它作为按钮或按钮,它仍然没有效果。当通过脚本映射时,触摸控制器上的所有其他按钮都能完美工作,但问题仅存在于这4个按钮 OVRINPUT模块: public OVRInput.Button jo
public OVRInput.Button joyPadClickButton7 = OVRInput.Button.Two;
public OVRInput.RawButton joyPadClickButton8 = OVRInput.RawButton.RHandTrigger;
...
...
virtual protected PointerEventData.FramePressState GetGazeButtonState()
{
var pressed = Input.GetKeyDown(gazeClickKey) || OVRInput.GetDown(joyPadClickButton7) || OVRInput.GetDown(joyPadClickButton8);
var released = Input.GetKeyUp(gazeClickKey) || OVRInput.GetUp(joyPadClickButton7) || OVRInput.GetDown(joyPadClickButton8);
#if UNITY_ANDROID && !UNITY_EDITOR
// On Gear VR the mouse button events correspond to touch pad events. We only use these as gaze pointer clicks
// on Gear VR because on PC the mouse clicks are used for actual mouse pointer interactions.
pressed |= Input.GetMouseButtonDown(0);
released |= Input.GetMouseButtonUp(0);
#endif
if (pressed && released)
return PointerEventData.FramePressState.PressedAndReleased;
if (pressed)
return PointerEventData.FramePressState.Pressed;
if (released)
return PointerEventData.FramePressState.Released;
return PointerEventData.FramePressState.NotChanged;
}