ViveSoftware / ViveInputUtility-Unity

A toolkit that helps developing/prototyping VR apps.
http://u3d.as/uF7
Other
352 stars 82 forks source link

Unity 2020 LTS + Oculus doesn't read Oculus input, and fails to import ASMDEF in new project #225

Open wirelessdreamer opened 2 years ago

wirelessdreamer commented 2 years ago

image

image

Button input doesn't work in test scenes. Using a Quest 2 with Link.

Test Project: https://drive.google.com/file/d/1t3BxSY-m_TqIvNp39wjCEDvZ4b16krEE/view?usp=sharing

wirelessdreamer commented 2 years ago

The first part of this issue is from the package from the asset store, manually downloading the VIU release, and copying the missing asmdef's resolves the initial warning., Input over link, and in Quest builds still does not work though.

wirelessdreamer commented 2 years ago

I get the same results in the current version of Unity 2021 as well. I've tried with both Oculus, and OpenXR without success of reading oculus button input.

wirelessdreamer commented 2 years ago

Using the latest release from the releases page has the same issue and the package on the unity store.

chengnay commented 2 years ago

@wirelessdreamer Are you using VIU from Asset store or UPM?

wirelessdreamer commented 2 years ago

Same results with both.

chengnay commented 2 years ago

@wirelessdreamer Current VIU v1.13.2 is not compatible with Oculus Quest 2. It will take some time for us to fix issues starting from Oculus Integration v20.1(First version supporting Quest 2).

Here is a quick fix for you to run your Quest 2 using Link Quest,

  1. In Assets\HTC.UnityPlugin\VRModule\Modules\OculusVRModule.cs,
    • line 556, add case OVRPlugin.SystemHeadset.Oculus_Link_Quest_2: case OVRPlugin.SystemHeadset.Oculus_Quest_2:
  2. In Assets\HTC.UnityPlugin\ViveInputUtility\Scripts\Misc\OculusVRExtension\VIUOculusVRRenderModel.cs,
    • line 871, add case OVRPlugin.SystemHeadset.Oculus_Link_Quest_2: case OVRPlugin.SystemHeadset.Oculus_Quest_2:

Known issues,

  1. You will not be getting the correct Quest 2 controller model
  2. Controller model might get wrong model, for example, left model is showing right model or button is not in correct place

Sorry for the inconvenience. If you have further question, please let us know, thanks!

dantonks commented 2 years ago

@chengnay Just found this fix, thanks! I've been able to deploy to Quest 2 as well now. The one thing (and I note it is a known issue) is I have no controller rendering at all. This is with:

dantonks commented 2 years ago

Fixed my own issue, not a problem now. Under preferences > VIU settings (where you switch platform), expand Global Custom Render Model and set the Oculus Quest Controller Left/Right to OculusTouchForQuest2_{left/right}.