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

Sync. car wheels over UNET.

Discussion in 'UNet' started by Justice0Juic3, Feb 5, 2016.

  1. Justice0Juic3

    Justice0Juic3

    Joined:
    Apr 29, 2013
    Posts:
    188
    How?

    The car itself uses a networkIdentity already, so networkTransform sync is no otpion.
    I'm frustated there's seriously not one single topic anywhere on the web, related to this problem.
    I'm using the default UnityStandardAssets Car.

    No modified Networkmanager or other components.

    Bye
     
  2. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    uNet is far from abandoned. Why do you need to sync wheels turning? even for just a couple of cars that's a lot of data to be sending round. Would it not be better to have scripts that rotate wheels based upon actual movement of the car, then just send positional data on the cars?
     
    Chom1czek likes this.
  3. Justice0Juic3

    Justice0Juic3

    Joined:
    Apr 29, 2013
    Posts:
    188
    Don't get me wrong, but if I would use Commands and Client to sync the wheels (controlled by input), would it send too much data over the network?
     
  4. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    The goal is always to send the smallest amount of data possible. Sending data for all 4 wheels is totatlly needless, when position and rotation of the car is what's required. You can use simple maths to work out wheel rotation based on velocity to target position from whatever the server sends.

    How many players are you planning on per game/match/world? Have you already looked into latency issues, packet delay/loss, prediction, interpolation, dead reckoning, and other such mechanisms to make things appear to run smoothly?
     
    Justice0Juic3 likes this.
  5. Justice0Juic3

    Justice0Juic3

    Joined:
    Apr 29, 2013
    Posts:
    188
    Yes, I did take a look (and made changes) to run things smoothly. I must say the car's rotation and position are pretty accurate by now. I am planning to have about 3 to 5 players per match/race.
    I'll see what I can do related to your advice, thanks.
     
    Whippets likes this.