Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

_

Discussion in 'Multiplayer' started by wtMd4eUaa, Jun 6, 2014.

  1. wtMd4eUaa

    wtMd4eUaa

    Joined:
    Jan 18, 2013
    Posts:
    1
    -
     
    Last edited: Oct 28, 2019
  2. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    What you need to do is to correct the position on the client after the server makes its move (with the same input as the client). Also you are using co-routines and they do not execute in FixedUpdate they update on the normal time-based Update function.
     
  3. sandbaydev

    sandbaydev

    Joined:
    Aug 9, 2013
    Posts:
    104
    fixedUpdate does tons of different things, which makes it hard to debug or comment. rather than having all functionality inside that function... split it into pieces, and let each piece do it's thing.

    also, those "temp array" and "remove..()" are bit difficult to read. Why not name them like "positionX" or "rotationY", instead of arraytemp.

    Once the code looks bit cleaner, it's easier to say something.

    ---

    One minor thing: why set the networkview.observe to null?