11-24-2020 06:06 AM
12-10-2020 08:55 AM
JonathanWouters said:
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)
02-03-2021 12:00 PM
OVRControllerHelp: Active controller type: Quest2 for product Oculus Quest
04-03-2021 04:16 PM - edited 04-09-2021 06:52 PM
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?
04-07-2021 12:26 AM
Great find! Unfortunately this only enables Quest 1 Controllers. Did you find out how to display the white controllers?
04-08-2021 08:26 AM
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!
04-09-2021 06:53 PM
I updated my reply with more information regarding Quest 2 controller support.
05-22-2021 04:55 AM
ny update from Oculus on this? Would be great to get Quest controllers in the Avatar system...
11-23-2021 02:48 PM - edited 11-26-2021 08:53 AM
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;
}
}
11-26-2021 01:37 AM
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...