Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Network lag compensation

Discussion in 'Scripting' started by Wolfos, Jan 10, 2013.

  1. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    934
    I've been trying to setup a small multiplayer game, and it works fine, but the other players are kind of just teleporting around the place when I test, even on a local network where the ping is very low (or even on the same computer). This is, of course, because there is no interpolation happening between packets.

    My player objects make use of CharacterControllers, so how would I go about adding that?
     
  2. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    In the networking example in the resources section, there are mutiple examples included.
     
  3. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    934
  4. mikemalinowski

    mikemalinowski

    Joined:
    Oct 1, 2013
    Posts:
    3
    That link still appears dead to me. Can anyone link me to the project?
     
  5. Eyeshock

    Eyeshock

    Joined:
    Sep 7, 2012
    Posts:
    60
    Controller doesn't matter; also, network examples never really fixed the problem for me (but there's a chance they got updated). But it's dangerous to go alone, so take this:
    http://wiki.unity3d.com/index.php?title=NetworkView_Position_Sync

    Just remove all references to rigidbody if you're using character controller, although you should remove all movement/physics from objects running remote