Network Animator causing errors on network

Updated on April 19, 2018 in [A] Multiplayer
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
3 on April 19, 2018

So I’m making a military style shooter using UNET and all was going great until I had to add the soldier model with a fully rigged skeleton and animator. The only possible way I can find to sync animations over the network is to use the “NetworkAnimator”. But my dumbass decided not to test it just yet and when it came time to add the ragdoll. I finally tested it and every time I tried to kill the host player, it would throw and error and not spawn a ragdoll for the global players. But on the host screen, he dies just fine and the ragdoll spawns in. But when the host kills any other client all is good.

 

The error I am getting is “IndexOutOfRangeException: NetworkReader:ReadByte out of range:NetBuf sz:0 pos:0”. After 3 days of surfing the very few helpful forums out there I find out that the Network Animator is causing the issue so I disable, build the game and it works just fine, 100%.

 

So I guess my issue is how else am I supposed to sync a fully rigged soldier model over the network without causing errors with the Network Animator.

  • Liked by
Reply
2 on April 19, 2018

Are you making sure to spawn the ragdoll object on the network?

 

on April 19, 2018

Yes, every time a raycast hits a player, it calls the damage method from the server, and the damage method is an rpc call and the death function is called from there.

The ragdoll is spawning on every client just fine, I just don’t know how I can sync my soldier animations over the network without the Network Animator

on April 19, 2018

There is no way around not having a network animator for syncing network animations.

Show more replies
  • Liked by
Reply
Cancel