Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Syncing child objects over network

Discussion in 'Netcode for GameObjects' started by Durium, Feb 10, 2023.

  1. Durium

    Durium

    Joined:
    Feb 1, 2020
    Posts:
    37
    So im having a Player which has a Network Objects etc on him and that moves correctly over the network. However i have a child spear on the player that needs to have its rotation synced over the network.
    This is what happens when the host is attacking with the spear towards his aiming point

    upload_2023-2-10_17-57-16.png

    I tried attaching a network object on the spear but nothing went well.
    Here is the player prefab, the child objects have no network items attached on them
    upload_2023-2-10_17-58-59.png

    So to the question: How can i make the spear rotate correctly for the client ? Thanks!!
     
  2. Durium

    Durium

    Joined:
    Feb 1, 2020
    Posts:
    37
    The "WeaponParent" in this case is NOT syncing over the network somehow
     
  3. Durium

    Durium

    Joined:
    Feb 1, 2020
    Posts:
    37
    SOLVED: The solution was to attach a Client Network Transform to the object "weaponParent" under the player and now it syncs fine!
    upload_2023-2-11_10-11-29.png