I’m trying to learn the new network features (UNet) and the Network Transform needs some explanations. What are the meanings of the values? I mean, I can understand movement threshold (only sends data if the player moved more than that) but what about snapping? What is snapping? Does it make the transform jitter on a grid? It is supposed to make the movement choppy? Can I make it 0?
Also, interpolation isn’t clear. No matter what value I plug my character movement is always choppy. Is this a linear interpolation? Does it handle prediction? Would it be a better choice to code my own network transform?
Sorry for this messy thread, I’m just too excited that I’ll be able to make 3D multiplayer games soon enought. It is a child dream of mine =)
I think I read somewhere that interpolation works depending on the movement type. In particular, it doesn’t work for transform movement, but does work for rigidbody movement. Perhaps that means it will work if you put a kinematic rigidbody on it. Maybe someone else can offer more information.
This is bad =( … I could sync the character rigidbody anyway. Why wouldn’t they apply interpolation on transform movement? It is quite easy. I tried using with the character controler movement but it was just as choppy, no interpolation applied.
They’ll probably get to the transform interpolation in 5.1.1 or something.
As for other things, I think snap is a threshold at which the object just snaps to the new received position. For example if it’s set to 5, and since the last received position intformation the object moved more than 5 units, it’ll snap to the new position. In case of lag to prevent delayed interpolations I guess, if I’m correct. You know how in some games online players teleport all over the place when its lagging? That would be snapping. While in other games they don’t do that but it takes a while for the interpolated player to reach the actual position.
Network send rate is how many times per second do you send the new transform info. Default is 9, as in every 100ms or so.
The rest is self explanatory I think. But ask if you don’t understand. I just started exploring it like yesterday, and didn’t mess much with multiplayer stuff before UNET so I’m pretty green too.
@LucasZombieMontec If you don’t feel comfortable implementing the interpolation yourself look on YouTube for GamerToGameDeveloper. I cant get the link but he’s here on the forum too. He has a video on manually doing interpolation in his UNet series that I think is a solid base. It’s good to learn how these things work a little under the hood in my opinion anyway so you can tweak to your games needs if needed
when testing this in the latest build 5.1.0 it seems that the least choppy feel is with Sync Transform. also increase the Network send rate, this should work fine if you plan on using this to test with till it gets fixed. however I do not know much about networking, but playing around with it I got some nice results without jitter. Good luck
I’m also hoping for more information on network transform interpolation.
I use network transform for synching NPC monsters. I use Sync Transform with the highest send rate of 29. Interpolation seems to have no effect here. At least, I haven’t noticed any differences between test values of 1.0, 5.0 and 0.1. However, it would be nice if it is added because even on LAN, monster movement is a bit stuttering and not completely smooth.
(It seems to work fine when set to transform mode and no rigidbody, though it doesn’t appear to work when nested as a child object. Add the NetworkVisualizer gameobject to help figure out what’s going on)
Does anybody have any info about Sync Transform interpolation yet? I can’t seem to see any difference between Interpolate Mover values between 1 and 0.00001.
I haven’t touched the multiplayer in a while, but that interpolation setting was only for rigidbody last time I played with it. And from what I’ve heard, you’re best off making your own system for interpolation. There’s user tutorials you can find on youtube. Just make sure to seach for UNET (and maybe in time period after the release) so you get the new multiplayer videos not the old ones.
Yea I think I found a good UNet tutorial from the Youtube channel GTGD, but I’m just worried that sending all those commands every FixedUpdate() tick would be bad for the network traffic. I don’t know much about networking though, so I might be worried about nothing.
I just got matchmaker working and on the computer that created the room, everything moves around fine. On computers that join a room, it’s all jittery. I messed around with changing the setting in the inspector while it was running and saw no efffect. Does anyone know if changing them while its running is ok? or do I have to actually stop the game, make the changes and thenstart it up again?
I was so disappointed. I got the matchmaking working and two 3d characters running around in the same scene, except the client (joined) computer, the character was all jittery.
Anyone solved this? I wish Unity would chime in on this thread.
I’m pretty sure you have to build every time you change something. Try first getting it running smooth on the same computer. In other words run a few instances of the game on the same computer at the same time.