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

Procedual Animation in Multiplayer

Discussion in 'Multiplayer' started by ITheSpartaI, Jan 31, 2023.

  1. ITheSpartaI

    ITheSpartaI

    Joined:
    Jan 4, 2014
    Posts:
    12
    Hello Guys,

    so i got a Player Prefab which uses procedual animation for Leaning/Looking Up and down.
    Its done via a Transform on the bones.

    Now i got my networking set up. But i cant see the Procedual Animation on the other players, just Client only.

    How can i fix that? I have no clue.

    Im hoping for help, thanks in advance :)!

    Im using Mirror btw
     
  2. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168
    Well, we need to turn on the brain and think, how do other clients find out where the player is looking now? Probably need to transmit viewing angle data
     
  3. ITheSpartaI

    ITheSpartaI

    Joined:
    Jan 4, 2014
    Posts:
    12
    First of all, thank you for you answere, im really new to networking, so i searched everything but didnt find any answere to my question.
    How exactly would you start in that?
    As i would understand, i need to write a script, which gets the viewing angle data from my Controller Script.
    Thats no prob
    But how am i supposed to translate that to the "second player" because locally everthing works.
    I also cant get the transforms from the bones because the character should only use one network identity?
     
  4. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168
    I don't remember how this is done in Mirror (using [SyncVar] like)
    I hope someone will help you