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.

UE4: UOvrAvatar properties replication

m.milazzom.milazzo Posts: 47
Brain Burst
Since you released the first version of the AvatarSamples project for Unreal you provided some classes for managing the avatar, specifically ALocalAvatar (the pawn) e UOvrAvatar (which actually manages the avatar's aspect, the head and the hands). In this sample there was only the avatar (head and hands) and, progressively, you added the new features (LookAndFeel v2 and lastly the lip sync features). What you never provided is a way to have this avatar "really" replicated (apart from the fully local recording of the avatar parts' position and the application of the locally recorded characteristics to the "remote" avatar, which actually isn't remote).
More than one year ago we decided to modify your avatar to actually replicate it in a multiplayer context, so we replicated the position of the head and hands and we used your avatar (with our modifications) in our applications in a very satisfactory way, until version 4.19.2 of the Unreal Engine.
In UE 4.20 you integrated the OvrAvatar plugin into the engine, and since UE 4.21 you changed a lot of things on how the position of head and hands are managed.
Since we should redo all our work by modifying your plugin's classes to replicate the avatar in a multiplayer context, before of starting I would ask if you think to add the replication features to your avatar (head, hands, eyes, lip sync) and, eventually, when.

What about let developers access to ovrAvatarPacket? What "terrible secret" is hidden by this struct? :smile:

Thanks for your support.


  • NeontopNeontop Posts: 235 Oculus Start Member
    edited September 2019
    Hi @ginopeloso as you made change in the plugin and create some code to achieve what you wanted, I would like to know if you can help me on that.
    On the last AMA I asked Chris about accessing the bones of the Oculus Avatar but cannot do anything with his answer.
    I received a solution to do that but my knowledge to access PRIVATE STRUCTURE is not to strong.
    Can you help me with  this:
    *******  ANSWER FROM DEV  *****

    They will have to update OvrAvatar.cpp with a bit of code.  They need to find the PoseableMeshComponent with “hand_left” and “hand_right” in the their names (substring).


    These are in the structure, which is currently private.

           TMap<ovrAvatarAssetID, TWeakObjectPtr<UPoseableMeshComponent>> MeshComponents;


    Once they have the PoseableMeshComponent for the hand, it has an interface :


    UFUNCTION(BlueprintCallable, Category="Components|PoseableMesh")

    FTransform GetBoneTransformByName(FName BoneName, EBoneSpaces::Type BoneSpace);


    They should be able to use the same bone names from the Unity sample to find the bones they want.


    I think that achieves what they are looking for, they just need to  write an accessor to find the hand meshs.

               *********** END ****


Sign In or Register to comment.