Search Unity

Oculus Quest Controllers not working in Unity

Discussion in 'VR' started by unity_tLetMjO0l9relw, Aug 1, 2019.

  1. unity_tLetMjO0l9relw

    unity_tLetMjO0l9relw

    Joined:
    Aug 1, 2019
    Posts:
    2
    I installed the Oculus integration v1.3.9 on my 2019.1.12f1 unity and when I build and run the game, the controllers do not show up or track. If I hit the thumbsticks I move a little bit forward or backwards but i dont know why. Anyway to fix this?
     
  2. Wattosan

    Wattosan

    Joined:
    Mar 22, 2013
    Posts:
    460
    Same problem here. Pressing the trigger on each of the controllers, activates one of them. Pressing it on the second controllers, deactivates the first one and activates the second controller. Using 2019.1.11f1.

    The toggling only works if I add a custom child gameobject (a cube, a sphere etc) under the hand anchors.
     
  3. Wattosan

    Wattosan

    Joined:
    Mar 22, 2013
    Posts:
    460
    Got an answer from this thread.
     
  4. unity_tLetMjO0l9relw

    unity_tLetMjO0l9relw

    Joined:
    Aug 1, 2019
    Posts:
    2
    This does fix the moment issue, but my controllers are still not showing up. But thank you because at least this is a step in the right direction.
     
  5. AdrellaDev

    AdrellaDev

    Joined:
    Jul 30, 2018
    Posts:
    15
    I haven't been able to find an answer why but it's a problem with the 1.39 integration. Once I rolled back to 1.38 my hands showed back up.
     
  6. appymedia

    appymedia

    Joined:
    May 22, 2013
    Posts:
    95
    You need to add Avatar App ID's because of a change in 1.39. Go into the Oculus menu and the Avatar settings (I think that's the wording, doing from memory) and then enter some real App ID's or I just put in 999999 in both Rift and Gear ID's and things started to work.

    That said your using a Quest so might not be the issue bit was the problem for me and my Rift.
     
    brendenackermann likes this.
  7. norby

    norby

    Joined:
    Jul 10, 2006
    Posts:
    277
    Hi Folks

    I have nearly tried everything, but i can't get it to work
    my controller are moving in very small steps and i can't turn
    I am not a programmer, but this is what if have tried.

    I am out of options, any help would be appreciated.

    Norby

    attempt 1)
    1.Go to <UnityInstallationDirecory>\Editor\Data\PlaybackEngines\AndroidPlayer\Apk, Copy the AndroidManifest.xml file to your <ProjectName>Assets\Plugins\Android

    2. Add <uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1" /> after </application>


    attempt 2)
    . Make sure OVR camera is set to oculus quest not go/gear vr.

    2. Make sure you have a folder named plugins with another folder innside named android and in the android folder is where the manifest belongs. Don't have a manifest. Just go to your project folder>Temp>Staging Area. There should be an android manifest that you can copy and paste into the Plugins>Android folder.

    3. Add <uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1" />

    to the manifest.

    attempt 3)

    I like this solution best. Saves you from having to build your project.


    https://developer.oculus.com/documentation/quest/latest/concepts/mobile-native-manifest/


    Find the AndroidManifest.xml file in the Plugins/Android folder. Then update the least 2 lines with this:

    Code (CSharp):
    1. </application>
    2. <uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1" />
    3. <uses-feature android:glEsVersion="0x00030001" />
    4. </manifest>
    That is insert the two lines:
    <uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1" />
    <uses-feature android:glEsVersion="0x00030001" />

    attempt 4)

    1. <?xml version="1.0" encoding="utf-8"?>
    2. <manifest
    3. xmlns:android="http://schemas.android.com/apk/res/android"
    4. package="com.unity3d.player"
    5. xmlns:tools="http://schemas.android.com/tools"
    6. android:installLocation="preferExternal">
    7. <supports-screens
    8. android:smallScreens="true"
    9. android:normalScreens="true"
    10. android:largeScreens="true"
    11. android:xlargeScreens="true"
    12. android:anyDensity="true"/>
    13. <application
    14. android:theme="@StyLe/UnityThemeSelector"
    15. android:icon="@Mipmap/app_icon"
    16. android:label="@String/app_name">
    17. <activity android:name="com.unity3d.player.UnityPlayerActivity"
    18. android:label="@String/app_name">
    19. <intent-filter>
    20. <action android:name="android.intent.action.MAIN" />
    21. <category android:name="android.intent.category.LAUNCHER" />
    22. </intent-filter>
    23. <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    24. </activity>
    25. </application>
    26. <uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1" />
    27. <uses-feature android:glEsVersion="0x00030001" />
    28. </manifest>


     
  8. Corysia

    Corysia

    Joined:
    Mar 14, 2018
    Posts:
    108
  9. norby

    norby

    Joined:
    Jul 10, 2006
    Posts:
    277
    Thanks Corysia

    I will take a look later today

    Norby
     
  10. norby

    norby

    Joined:
    Jul 10, 2006
    Posts:
    277
    Hi Corysia

    Thanks a lot, it works again
    Great work !

    Norby