cancel
Showing results for 
Search instead for 
Did you mean: 

Cross-platform avatar hands not activating

EntroPiGames
Explorer
Hi,

I'm trying to add support for cross-platform avatars to the OpenVR version of my app, but I've run into an issue.

These is how I've setup the Avatar component:

h2ib6axwlmlk.png

I've disabled the component, but I enable it from code once I've set the "Oculus User ID" property to one of the preset IDs. The body of the avatar is working as intended, but the hands never show up. I've tried enabling the "Show First Person" property as well, but it had no effect.

After some digging, it looks like this call to the Oculus API in OvrAvatarSkinnedMeshRenderComponent::UpdateSkinnedMeshRender (line 23) for the hand components, always returns a visibilityMask without any flags set:
ovrAvatarVisibilityFlags visibilityMask = CAPI.ovrAvatarSkinnedMeshRender_GetVisibilityMask(renderPart);
Is this intended behavior for cross-platform avatars, or a bug?

Unity version: 2017.4.18f1
Oculus integration: 1.32.1
3 REPLIES 3

EntroPiGames
Explorer
I figured out what the issue was. 

Apparently you need to use the OVRCameraRig prefab (instead of the SteamVR rig) for the cross platform avatars to work correctly out of the box. But since the cross-platform functionality of the OVRCameraRig only supports Oculus Touch controllers at the moment and relies on the OVRManager script, that's not really an option for my project. 

Found a workaround though, which doesn't require an instance of OVRManager to be created, since all the functions called are static:

        private void Start()
        {           
            OVRManager.loadedXRDevice = OVRManager.XRDevice.OpenVR;
        }

        private void Update()
        {               
    OVRInput.SetOpenVRLocalPose(
leftHandLocalPosition,
rightHandLocalPosition,
leftHandRotation,
rightHandRotation);

OVRInput.Update();           
        }
Only problem is that the hands don't line up with the controllers correctly.

treeviewstudios
Protege
I use my custom implementation of Avatar Driver, passing the position of each part and button, overriding the avatar driver is the best way to go if you use something like VRTK and dont want to depend on Oculus OVRManager.

https://pastebin.com/492LP4g8

mogacreative
Explorer
Are you guys still using your custom fixes or have you found a better way? I have the same problem.