cancel
Showing results for 
Search instead for 
Did you mean: 

oculusUserID Confusion Social Sample. Can't Get Personalized Avatars to Work.

raeldor
Expert Protege
I'm trying to get the personalized avatars to work in the social starter but they're still coming out as a gray base model.  In the documentation it says...

After getting a user ID, we then can set the oculusUserID of the Avatar accordingly. The timing is important, because we have to set the user ID before the Start() function in OvrAvatar.cs gets called.

And yet in the sample, the code sets...

        remoteUser.RemoteAvatar.oculusUserIDInternal = userID;

To add to the confusion this field is a ulong, yet oculusUserID is a string.  Even more weird is in the Start() code for OvrAvatar it says...

            oculusUserIDInternal = UInt64.Parse(oculusUserID);

Which makes it seem like the field that's being set in the social starter is being overwritten immediately.  I've tried adding the code...

        remoteUser.RemoteAvatar.oculusUserID = userID.ToString();

and also out of desperation...

        remoteUser.RemoteAvatar.oculusUserID = oculusID; // from user.OculusID in RoomManager.ProcessRoomData()

But neither seem to give customized avatars.

Anyone have any other ideas?
Thanks
10 REPLIES 10

raeldor
Expert Protege
Looks like this may be some kind of a shader issue.  But does anyone know what mobile shaders to assign to the RemoteAvatar slots?

Also, the hands are 10 foot above my head.  I'm going to hazard a guess this maybe wasn't tested on the Oculus Go?

Heaney-555
Heroic Explorer
You are using a pre-placed RemoteAvatar in the scene instead of instantiating in code, right?

If so, you need to have it start disabled (ie. uncheck the checkmark for it in Hierarchy), feed the oculusUserID (do NOT use the oculusUserIDInternal field!) to it before it loads, and then SetActive(true) once that ID has been assigned.

As for the hands thing, that's a bug right now, you need to just manually lower the Y value of the position for Go / Gear VR.

owenwp
Expert Protege
In the 1.27 sample framework bundle, both the avatar user ID field and the platform user ID field are ulongs, but still don't work. I always get the default avatar.

raeldor
Expert Protege
Appreciate the fixes.  I will put this in now and try it out.  Do you any recommended fixes for mobile shaders and broken body/hand/leg positioning too?  Thanks!

Ross_Beef
Heroic Explorer
Hey there - what, specifically is the shader issue you’re seeing?

also - the hand offset is also fixed in 1.28

raeldor
Expert Protege
Appreciate the update.

So, the other person's avatar takes on the custom shape, but everything is still gray.  Also, the head does not move up and down or yaw either.  Sorry to keep adding to your problems. :dizzy:

Is the hand (or is it body problem, since the body is below the torch-light?) offset fix something I can change in the code?

raeldor
Expert Protege
Fixed the height issue by changing to...

    private const float mobileBaseHeadHeight = 0.0f;

on the OvrAvatarLocalDriver.  Not sure if that will screw things up on GearVR but it fixes Oculus GO.  Texture issues and head not moving up/down/yaw+- still outstanding.

raeldor
Expert Protege
Is there a release date for 1.28 yet, as it seems to be one problem after another trying to use this with the Oculus Go? I tried fixing the height problem by putting in this bolded line...

        if (GetIsTrackedRemote())
        {
            CurrentPose = new PoseFrame
            {
                voiceAmplitude = voiceAmplitude,
                headPosition = new Vector3(headPos.x, headPos.y-1.3f, headPos.z),

But all it does it change the hand height and not the head height.  How are they not linked?!  Why is the avatar position relative to the hand not linked?

 Thanks

raeldor
Expert Protege
Also, does anyone know how the remote avatars om the list get rendered?  They doesn't seem to have any parent transform.