Search Unity

About network sample

Discussion in 'Multiplayer' started by ll2178, Jan 13, 2010.

  1. ll2178

    ll2178

    Joined:
    Jul 10, 2009
    Posts:
    8
    I'm making a network racing game.
    so i downloaded network sample in unity3d site.

    it works greate when the car is slow.

    but the network car is jittering so much, when it goes faster.

    I tried several way to fix it. but i failed.

    Does anybody have any idea?
     
  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    What have you tried and how did it fail (compiler errors, etc)? Also, can you explain what kind of jittering you are seeing? Is the camera shaking, or is it the car's steering that is shaky, or does its position vibrate or... ?
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Networked physics is never easy and the faster you make it the larger the prediction errors betweeen client and server will be.

    Sounds like you would want to not use physics in this case to get more predictability.
     
  4. ll2178

    ll2178

    Joined:
    Jul 10, 2009
    Posts:
    8
    the network car position jittered back and forward when it move faster. i use source code networkrigidbody.cs in network example.

    I'm sorry about i can't explain all because of my poor english.

    There is a few examples about network in unity3d.
    so is there any examples?
     
  5. nvarcha

    nvarcha

    Joined:
    Sep 27, 2008
    Posts:
    191
    Try to set the InterpolationBackTime of the NetworkRigidBody to the average ping, that might help.

    I've tried the network example and modified the car settings to reach over 400 km/h and in a LAN environment it seems to work fine.

    Another thing you might want to try is to add some smoothing between each frame's position and rotation correction, instead of just changing it.

    How fast your car is going?