Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question [FishNet][Multiplayer Newby] Cannot Syncronize Clients

Discussion in 'Multiplayer' started by ValhallaApp, May 11, 2024.

  1. ValhallaApp

    ValhallaApp

    Joined:
    Jul 10, 2017
    Posts:
    3
    Hi there i'm new to Multiplayer in general and as the title say i'm having some problem telling the other clients what the owner Client is doing to other Clients(Host in this case and vice versa)
    This is a video of the problem occurring

    Prone Crouch Run Slide and Jump are all perfectly syncronized
    Reload Lean Shoot and weapon changing are not and i don't know what should i do to make it work i'm reading all the documentation now to see i could find some solution or hint in the right direction.

    Some (maybe) useful infos:
    The IK bones are using a NetworkTransform too
    There are no SyncVars by now (i don't think i need to use them for this case)
    I've changed Animator to NetworkAnimator in the code where i found i could do that(Mainly a Crossfade,and a Signal)

    Thank you in advance for any help :)

    Edit: Even looking up and down is not being Sync
     
  2. HighKeys

    HighKeys

    Joined:
    Jan 6, 2016
    Posts:
    31
    Hey there,

    is this a Server Auth or Client Auth setup?

    If Server Auth, are you using CSP or just the NT to Sync movment?

    Could you share your Player Setup?
     
  3. ValhallaApp

    ValhallaApp

    Joined:
    Jul 10, 2017
    Posts:
    3
    Hi No this is not Server Auth as far as i know

    Yeah i absolutely can share Player setup:
    This is the Hierarchy
    upload_2024-5-11_13-12-31.png
    This is the inspector:
    upload_2024-5-11_13-19-28.png
    The network animator that's empty get taken at runtime with a GetComponent<NetworkAnimator> that's a just a [SerializeField] i did to make sure
     
  4. Punfish

    Punfish

    Joined:
    Dec 7, 2014
    Posts:
    422
    In most cases IK overrides transform movement, so putting NetworkTransform on the IK bones is probably not helping. You can synchronize animator properties which update IK, or variables you want to use with IK such as look target/rotation.
     
    ValhallaApp likes this.
  5. ValhallaApp

    ValhallaApp

    Joined:
    Jul 10, 2017
    Posts:
    3
    Thank you so much for the answer :) i still haven't solved this specific problem but i think i'm ont he right track also the discord is super friendly helped me understand SyncVar and RPC's much better
     
    Punfish likes this.
  6. Punfish

    Punfish

    Joined:
    Dec 7, 2014
    Posts:
    422
    Last time I did IK in multiplayer I literally just sent the IK goals and it looked perfect. EG: if I wanted to twist the hips and look with the arms (such as holding a weapon) I would send the look point from the player and ran the IK from that. Essentially I took what the owner used and sent that to others.