cancel
Showing results for 
Search instead for 
Did you mean: 

[Unity] OVR Avatar shows wrong controllers on quest 2

JonathanWouters
Honored Guest
Hi,
I'm trying to show the users controllers with ovr avatar in unity.
On quest 2 it shows the original rift controllers.
Is this normal / is there a way to fix this ? I've already tried to regenerate the manifest file.

It works fine on other devices (quest / rift s / rift)
11 REPLIES 11

MUVirsabi
Explorer


Hi,
I'm trying to show the users controllers with ovr avatar in unity.
On quest 2 it shows the original rift controllers.
Is this normal / is there a way to fix this ? I've already tried to regenerate the manifest file.

It works fine on other devices (quest / rift s / rift)


Same issue - did you manage to fix it?

ruud3DV
Protege
Same issue here, Rift Touch controllers showing on Quest 2 when using OvrAvatar.
Using Unity 2018.4..22f1 and Oculus Integration 23.1 (Dec 22nd 2020). 

OVRControllerHelper debug shows the correct controller type being detected:
OVRControllerHelp: Active controller type: Quest2 for product Oculus Quest
The OVRControllerHelper also contains the correct references to OculusTouchForQuest2 models, but still the Rift Touch controller is shown when built for the Quest 2.

Anyone an idea on how to fix this?

solaris.nite
Protege

Adding Quest 2 controller support will depend on how you have implemented controllers in your app.

 

If you are using OVRControllerPrefab from the Oculus SDK then it should "just work". They have already updated this script (OVRControllerHelper) and prefab to support the Quest 2 controllers. The actual controller models, animations, and materials can be found in:

Oculus/VR/Meshes/OculusTouchForQuest2/*

 

If you are using the Oculus Avatar system and the Local Avatar prefab for controller support (which is necessary to see your hands on the controllers), unfortunately this is not yet supported by the Oculus Avatar SDK. I suggest you implement a short-term work around to show the Quest 1 controllers on Quest 2 rather than the Rift CV1 controllers:

Below OvrAvatarDriver.cs:77 (in OvrAvatarDriver.Start()) add

 

case OVRPlugin.SystemHeadset.Oculus_Quest_2

 

 

Oculus needs to update the Avatar SDK in order to support Quest 2 controller rendering with hands because the Avatar SDK's C API is responsible for setting the controller model. I downloaded the headers for the C API of the Avatar SDK and confirmed that no enum value exists for the Quest 2. See:

// Oculus Unity integration
OvrAvatarDriver.UpdateTransformsFromPose(IntPtr sdkAvatar)

// Oculus Avatars SDK C-API
/// Controller Types
///
typedef enum ovrAvatarControllerType_ {
  ovrAvatarControllerType_Touch,
  ovrAvatarControllerType_Malibu,
  ovrAvatarControllerType_Go,
  ovrAvatarControllerType_Quest,

  ovrAvatarControllerType_Count,
} ovrAvatarControllerType;

Any attempt to work around this limitation would likely get really hairy and I don't recommend it. Oculus is building a new avatar system for Horizon which will eventually roll out to the rest of us. It's possible that they haven't noticed this support is missing because they're using the new SDK internally?

Great find! Unfortunately this only enables Quest 1 Controllers. Did you find out how to display the white controllers?

Oh man, thank you for this! I've been trying to fix this issue for a day or so now! Still only seeing quest 1 controllers but this is a huge help still!

I updated my reply with more information regarding Quest 2 controller support.

r0b0saru
Expert Protege

ny update from Oculus on this? Would be great to get Quest controllers in the Avatar system...

EDIT: The solution I provided below doesn't work on device.

Use solaris.nite's solution for now It render's Quest1 controllers instead of Quest 2 controllers... Interestingly enough you can get Quest 2 controllers to render in Airlink by creating a separate case statement for it and settings controller type equal to .Count hopefully this mean we will be able to use this to render on device soon but for now Quest 1 controllers is the way to go.


Original Post:
Since this pops up higher on google felt like sharing a newer solution that works a bit better.
In this post a user by the name Kohijin gives a version of the OvrAvatarDriver's Start that shows the correct Quest 2 controllers inside the editor through AirLink or a Link cable, will test in a build soon but looks promising.

 

 

 

 

    void Start()
    {
        var headsetType = OVRPlugin.GetSystemHeadsetType();
        switch (headsetType)
        {
            case OVRPlugin.SystemHeadset.Oculus_Link_Quest_2:      
            case OVRPlugin.SystemHeadset.Oculus_Quest_2:
                ControllerType = ovrAvatarControllerType.Count;
                break;
            case OVRPlugin.SystemHeadset.Oculus_Link_Quest:
            case OVRPlugin.SystemHeadset.Oculus_Quest:
            case OVRPlugin.SystemHeadset.Rift_S:
            ControllerType = ovrAvatarControllerType.Quest;
                break;
            case OVRPlugin.SystemHeadset.Rift_DK1:
            case OVRPlugin.SystemHeadset.Rift_DK2:
            case OVRPlugin.SystemHeadset.Rift_CV1:
            default:
                ControllerType = ovrAvatarControllerType.Touch;
                break;
        }
    }

 

 

 

 

 

Anonymous
Not applicable

Is this working for anyone? I tried fixing the code like shown but it doesn't help me. When I start the app the screen just freezes for 15-20 sec and than the game loads with the Quest2 controllers but no hands on them, it's just showing the Quest2 controller prefabs from the hierarchy, avatar doesn't seem to be working...