Forum Discussion

lokee.682753's avatar
lokee.682753
Honored Guest
25 days ago
Solved

Colocation with Networked Avatars

I'm using building blocks to test colocation and network avatars, The colocation part of the app works. But there is an issue with network avatars,
Issue: When the second device joins via colocation the player spawns at (0,0,0) with avatar, But after the camera rig adjust itself to the spatial anchor the player(camera rig) goes to the location but the avatar still remains at the initial position.
I have tried finding the "LocalPlayer" gameobject and repositioning it after some delay but it still remains at the same place.

  • I tried making the avatar children of the Camera rig but as the camerarig is not a networked object that doesn't work. After looking through documentation i found out about the ColocationoReadyCallback() and using that I aligned my avatar. 

2 Replies

  • Hello there lokee.682753!

    Sorry to hear that you're having trouble with your avatar's colocation, I get how that could be frustrating. Have you tried to parent the avatar GameObject to the camera rig? Parenting the avatar GameObject to the camera rig should hopefully ensure the avatar follows the rig’s movement and position updates, which sounds like the issue you described.

    If that doesn't fix it, we have some documentation that should hopefully point you in the right direction. I can link our Colocation Overview documentation, as well as FAQs and tips/tricks below. Additionally, we also have some great documentation that goes over how to set up a networked avatar which you may find useful.

    Hopefully you found some of this helpful, and if not please feel free to let me know and we can troubleshoot further!

    Colocation Overview
    Colocation Tips, Tricks, and FAQs
    Networking Avatars using Meta Avatars SDK

    -G

    • lokee.682753's avatar
      lokee.682753
      Honored Guest

      I tried making the avatar children of the Camera rig but as the camerarig is not a networked object that doesn't work. After looking through documentation i found out about the ColocationoReadyCallback() and using that I aligned my avatar. 

→ Find helpful resources to begin your development journey in Getting Started

→ Get the latest information about HorizonOS development in News & Announcements.

→ Access Start program mentor videos and share knowledge, tutorials, and videos in Community Resources.

→ Get support or provide help in Questions & Discussions.

→ Show off your work in What I’m Building to get feedback and find playtesters.

→ Looking for documentation?  Developer Docs

→ Looking for account support?  Support Center

→ Looking for the previous forum?  Forum Archive

→ Looking to join the Start program? Apply here.

 

Recent Discussions