Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

SDK 1.28 Remote Avatar Not Moving Anymore

This was working before 1.28, but now when the local avatar moves in 1.28 the movement does not seem to be replicated to the remote avatar on the remote headset.  The mouth movement and head rotation etc. are working fine, but positional movements are not being honored.  Did something change here?

Thanks
Ray

Comments

  • raeldorraeldor Posts: 55
    Hiro Protagonist
    Well, far as I can see there's no visibility into SDKPacket and it's certainly not communicating any body position information.  When I try and switch Use SDK Packets off the whole app just crashes.  Nobody else is moving these avatars around?  Really?
  • Ross_BeefRoss_Beef Posts: 170 Oculus Staff
    Hey @raeldor - we have engineers looking into it but can’t get a repro. Any chance you can share any logging?
  • Ross_BeefRoss_Beef Posts: 170 Oculus Staff
    Can I confirm that you've gone from 1.27 to 1.28? Will help us triage where this could've cropped up.
    Can I also confirm the engine (Unity, UE, Native), platform (PC, Mobile) and, if it's one of our samples, the scene you're in?
  • raeldorraeldor Posts: 55
    Hiro Protagonist
    Yes, correct.  Unity and SDK 1.27 to 1.28.  There doesn't seem to be a lot of information in the log unless I put some debug writes.  I took your social start sample and basically put some 3d objects into it.  This is on Oculus Go platform.  I notice your SDK says...

    #if UNITY_2017_2_OR_NEWER
            Vector3 headPos = UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.CenterEye);

    I put some debug lines in...

            Debug.Log("Unity XR Center Eye=" + UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.CenterEye).ToString());
            Debug.Log("This name=" + this.name);
            Debug.Log("This parent name=" + this.transform.parent.name);
            Debug.Log("This grand parent name=" + this.transform.parent.parent.name);
            Debug.Log("This position=" + this.transform.position.ToString());
            Debug.Log("This parent position=" + this.transform.parent.transform.position.ToString());
            Debug.Log("This grand parent position=" + this.transform.parent.parent.transform.position.ToString());

    And they all start off looking like this...

    09-13 08:39:12.057 11511 11526 I Unity   : Unity XR Center Eye=(0.0, 1.6, 0.1)
    09-13 08:39:12.057 11511 11526 I Unity   :  
    09-13 08:39:12.057 11511 11526 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    09-13 08:39:12.057 11511 11526 I Unity   : 
    09-13 08:39:12.057 11511 11526 I Unity   : This name=LocalAvatar(Clone)
    09-13 08:39:12.057 11511 11526 I Unity   :  
    09-13 08:39:12.057 11511 11526 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    09-13 08:39:12.057 11511 11526 I Unity   : 
    09-13 08:39:12.057 11511 11526 I Unity   : This parent name=TrackingSpace
    09-13 08:39:12.057 11511 11526 I Unity   :  
    09-13 08:39:12.057 11511 11526 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    09-13 08:39:12.057 11511 11526 I Unity   : 
    09-13 08:39:12.057 11511 11526 I Unity   : This grand parent name=OVRCameraRig
    09-13 08:39:12.057 11511 11526 I Unity   :  
    09-13 08:39:12.057 11511 11526 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    09-13 08:39:12.057 11511 11526 I Unity   : 
    09-13 08:39:12.057 11511 11526 I Unity   : This position=(0.0, 4.0, 5.0)
    09-13 08:39:12.057 11511 11526 I Unity   :  
    09-13 08:39:12.057 11511 11526 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    09-13 08:39:12.057 11511 11526 I Unity   : 
    09-13 08:39:12.057 11511 11526 I Unity   : This parent position=(0.0, 4.0, 5.0)
    09-13 08:39:12.057 11511 11526 I Unity   :  
    09-13 08:39:12.057 11511 11526 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    09-13 08:39:12.057 11511 11526 I Unity   : 
    09-13 08:39:12.057 11511 11526 I Unity   : This grand parent position=(0.0, 4.0, 5.0)

    but when the player moves the other positions change, but the XR CenterEye does not!...

    09-13 08:39:22.078 11511 11526 I Unity   : Unity XR Center Eye=(0.0, 1.6, 0.1)
    09-13 08:39:22.078 11511 11526 I Unity   :  
    09-13 08:39:22.078 11511 11526 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    09-13 08:39:22.078 11511 11526 I Unity   : 
    09-13 08:39:22.078 11511 11526 I Unity   : This name=LocalAvatar(Clone)
    09-13 08:39:22.078 11511 11526 I Unity   :  
    09-13 08:39:22.078 11511 11526 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    09-13 08:39:22.078 11511 11526 I Unity   : 
    09-13 08:39:22.078 11511 11526 I Unity   : This parent name=TrackingSpace
    09-13 08:39:22.078 11511 11526 I Unity   :  
    09-13 08:39:22.078 11511 11526 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    09-13 08:39:22.078 11511 11526 I Unity   : 
    09-13 08:39:22.078 11511 11526 I Unity   : This grand parent name=OVRCameraRig
    09-13 08:39:22.078 11511 11526 I Unity   :  
    09-13 08:39:22.078 11511 11526 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    09-13 08:39:22.078 11511 11526 I Unity   : 
    09-13 08:39:22.078 11511 11526 I Unity   : This position=(0.2, 0.5, -2.4)
    09-13 08:39:22.078 11511 11526 I Unity   :  
    09-13 08:39:22.078 11511 11526 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    09-13 08:39:22.078 11511 11526 I Unity   : 
    09-13 08:39:22.078 11511 11526 I Unity   : This parent position=(0.2, 0.5, -2.4)
    09-13 08:39:22.078 11511 11526 I Unity   :  
    09-13 08:39:22.078 11511 11526 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    09-13 08:39:22.078 11511 11526 I Unity   : 
    09-13 08:39:22.078 11511 11526 I Unity   : This grand parent position=(0.2, 0.5, -2.4)

    So the question is... how exactly are you expecting to transfer the movement information when it's not passed to the packet?  Also, if I start messing with the head position, the head/hand alignment goes out of whack too, so that's not an easy fix.

    A company as big as Facebook I'm assuming you guys have a QA plan you run through before release.  Could the avatar movement be added to that plan?

  • spacefrogspacefrog Posts: 55
    Hiro Protagonist
    edited September 2018
    For me there was no change with the avatar positional tracking network transport after updating to V1.28. Local avatar position still gets recorded and packets send ( i adapted the P2P reference code from the social sample from oculus ). On the opposite peer, packets get received and can be applied to the remote avatar the same as pre V1.28. Only thing that changed is that the consistency between mobile and rift/desktop avatar positioning was improved .
    But still there are some quirks, like eg. you have to manually deal with mobile avatars positioning when you turn off positional tracking and/or switch to eye level tracking in mixed (mobile/desktop) VR experiences

  • raeldorraeldor Posts: 55
    Hiro Protagonist
    I think I found why it's crashing when using Unity Packets.  This function is being passed Unity packets, but does not cope with them and instead calls the CAPI packet functions directly...

        public void OnLocalAvatarPacketRecorded(object sender, OvrAvatar.PacketEventArgs args)
        {

            var size = Oculus.Avatar.CAPI.ovrAvatarPacket_GetSize(args.Packet.ovrNativePacket);
            byte[] toSend = new byte[size];
      
            Oculus.Avatar.CAPI.ovrAvatarPacket_Write(args.Packet.ovrNativePacket, size, toSend);

            foreach (KeyValuePair<ulong, RemotePlayer> kvp in remoteUsers)
            {
                LogOutputLine("Sending Packet to  " + kvp.Key);
                p2pManager.SendAvatarUpdate(kvp.Key, this.transform, packetSequence, toSend);
            }

            packetSequence++;
        }


  • raeldorraeldor Posts: 55
    Hiro Protagonist
    Ok, I may have found the problem here, so I'm a little confused how this is working for anyone else.  Anyways in OnLocalAvatarPacketRecorded in SocialPlatformManager there is the line...

                    p2pManager.SendAvatarUpdate(kvp.Key, this.localAvatar.transform, packetSequence, toSend);

    Yet localAvatar is a descedent of OVRPlayerController which is the thing that moves, the local avatar itself doesn't move.  I believe this line should read...

                    p2pManager.SendAvatarUpdate(kvp.Key, this.transform, packetSequence, toSend);

    I changed in my copy and now it's working as expected.

    Any jobs going over there? :P
Sign In or Register to comment.