Forum Discussion
JonathanWouters
5 years agoHonored Guest
[Unity] OVR Avatar shows wrong controllers on quest 2
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 reg...
solaris.nite
5 years agoProtege
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?
- karmacoder5 years agoExplorer
Great find! Unfortunately this only enables Quest 1 Controllers. Did you find out how to display the white controllers?
- solaris.nite5 years agoProtege
I updated my reply with more information regarding Quest 2 controller support.
- czeid5 years agoHonored Guest
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!
- whitebozo4 years agoMHCP Member
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; } }- ApprovedAnonymous4 years ago
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...
- whitebozo4 years agoMHCP Member
Yeah sorry about this, should have tested a build before posting this... Works 100% fine in editor through airlink but doesn't work in the build. I'm back to rendering Quest 1 controllers for now hopefully Oculus patches this soon. I will go ahead and edit my original post.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 10 months ago
- 5 months ago
- 3 months ago