Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Lateupdate bone rotation not syncing over network.

Discussion in 'Multiplayer' started by Asii, Jan 25, 2017.

  1. Asii

    Asii

    Joined:
    Sep 28, 2012
    Posts:
    53
    Hey so i have had this problem for some hours now, can't find any solution online.

    Im rotation the spine of my character in lateupdate after the animation so he's pointing the way im aiming, this is working fine locally but not over the network. I have tried NetworkTransformChild, that doesn't work. i have tried removing the spine via layermask but doesn't do the trick either.

    Any suggestions? :)

    Thanks.
     
  2. GrandAlchemist

    GrandAlchemist

    Joined:
    May 21, 2014
    Posts:
    10
    Are you making a third person action game, where the player character can aim up/down?

    If so, I suggest using an IK component on your character, instead of trying to rotate/sync any bones directly.

    If you want the player character to aim at the center of the camera, create an empty game object as a child of the camera, and make sure it's "forward" (I think on the z axis).

    Then assign the empty game object as the ik target.

    Next, put a NetworkTransformChild component on the player, and assign the ik target as the transform, to sync it's position across the network.


    That's what I would do, hope it helps.
     
  3. Asii

    Asii

    Joined:
    Sep 28, 2012
    Posts:
    53

    Thanks i will try that :)
     
  4. slimmedaan

    slimmedaan

    Joined:
    Jul 22, 2017
    Posts:
    1
    I've the same problem, how do you mean assign the empty gameobject as IK target?