Search Unity

animation syncing by rpc

Discussion in 'Multiplayer' started by appels, Jun 25, 2010.

  1. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    Hi,

    When i send my player animations over rpc, the animation plays once and then the character stays still for 2 seconds and then the animation starts again. This happends all the time.
    How can i make it play it's animation all the time ?
    When i look at network debug log i see that the rpc calls are made.
    Eddy.
     
  2. huw

    huw

    Joined:
    Jun 5, 2010
    Posts:
    18
    You need to set the animation wrapmode to loop on the clients sides

    animation["Walking"].wrapMode = ...

    I do this in start() myself but you could also make an RPC if needed. This way you only need to send an RPC when an animation starts playing vs all the tme, saving valuable bandwidth.

    (if you're already doing this then the animations are badly made/there is a conflict somewhere else)
     
  3. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    ok, i think i know where the problem is.
    I followed a tutorial on the animation and i have to change the script i'm using.
    I'm indeed using wrapmode.Once.
    Thanks,
    Eddy.