Search Unity

[RELEASED] Smooth Sync - Smoothly network rigidbodies and transforms while reducing bandwidth

Discussion in 'Assets and Asset Store' started by Fuestrine, Aug 4, 2017.

  1. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @Doughtinator
    You can have the non-server player tell the server to move it.

    Usually this is done by having a PlayerController owned by the local systems and having the players and game objects owned by the server. You then send over your CMDs to the server on the PlayerController which tell the player objects to move.
     
  2. Doughtinator

    Doughtinator

    Joined:
    Aug 8, 2019
    Posts:
    10
    Thanks for the reply. I’ll look into this method.
     
  3. jdcart23

    jdcart23

    Joined:
    Jan 17, 2018
    Posts:
    12
    @Fuestrine Hi, I don't know if you have seen this behavior before, or someone else has mentioned it.

    I'm having a problem with your SmoothSyncEditor script where smoothsync fields are constantly being marked as dirty. This makes it so unity thinks that my prefab has been modified and Perforce checks out the file.

    I looked at your code and saw that SmoothSyncEditor is always marking the fields dirty even when they are not changed:

    Code (CSharp):
    1. public override void OnInspectorGUI()
    2. {
    3.  //...
    4.     EditorUtility.SetDirty(myTarget);
    5. }
    I changed it for now so that it only sets them as dirty when something changes in the GUI, however, this is only a temporary fix so I can keep working on my stuff. It is temporary because closing or opening a dropdown still marks it as dirty, when it really shouldn't:

    Code (CSharp):
    1. public override void OnInspectorGUI()
    2. {
    3.             if (GUI.changed)
    4.             {
    5.                 EditorUtility.SetDirty(myTarget);
    6.             }
    7. }
    Do you think you can go in and make a more permanent fix for this issue?
     
  4. sonderistic

    sonderistic

    Joined:
    Jan 4, 2017
    Posts:
    6
    "Game start" is when the client hosts the game. And the positions seem to be random on the x-z axis, but consistent in terms of y.

    I started spawning in these objects and they now seem to work fine.
     
  5. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    789
    @jdcart23 I'll look in to the editor script issues. Seems easy enough to fix. Thanks for pointing it out.

    @sonderistic Glad you were able to get it working some way at least.
     
  6. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    789
  7. sabinionut56

    sabinionut56

    Joined:
    May 25, 2019
    Posts:
    8
    if i buy this script it will make my game work better even if it is not a multiplayer or it only works for multiplayer games ?
     
  8. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
  9. Rmzn0

    Rmzn0

    Joined:
    Jul 24, 2018
    Posts:
    7
    I want to make a 4-player co-op game by purchasing Asset.

    Is it possible with your asset?
     
  10. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @Rmzn0
    That's too broad of a question unfortunately.

    Smooth Sync will make your game assets smooth across the network though. If you have more specific questions I'd be happy to answer them.
     
  11. Foestar

    Foestar

    Joined:
    Aug 12, 2013
    Posts:
    306
    No, you will not be able to make a 4 player co-op game by purchasing this asset. You can download Pun2 for free to try out as it will be the most friendly starting point to make a 4 player co-op game.

    What this asset DOES do is smooth out your game's player movement over the network meaning all the jittery movement that comes with lag. If you plan on making any kind of multiplayer game and don't know much about smoothing or compensating for lag or just want to save time then buy this. It is SUPER helpful in speeding up your workflow and is easy to implement.
     
  12. saukki

    saukki

    Joined:
    Nov 5, 2014
    Posts:
    1
    @Fuestrine Hi, I bought Smooth Sync a few days ago and wanted you to know that it doesn't work with the new Mirror v5.x release due to their API changes.
     
  13. caleb-holos

    caleb-holos

    Joined:
    Nov 5, 2019
    Posts:
    1
    @Fuestrine Smooth Sync isn't working with the latest Mirror package from their GitHub page. The SmoothSyncMirror contains the following error:

    Assets\Smooth Sync\Mirror\Smooth Sync Asset\SmoothSyncMirror.cs(644,29): error CS0117: 'NetworkIdentity' does not contain a definition for 'clientAuthorityCallback'
     
  14. Yarwad2

    Yarwad2

    Joined:
    Jan 13, 2019
    Posts:
    1
    Hi there. I just purchased the asset and got this error message upon importing the Mirror package:

    Assets\Smooth Sync\Mirror\Smooth Sync Asset\SmoothSyncMirror.cs(2041,100): error CS0246: The type or namespace name 'NetworkConnectionToClient' could not be found (are you missing a using directive or an assembly reference?)

    Is there a fix for this or should I request a refund? Thanks.
     
  15. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    789
    @saukki I was a little behind getting the update out but it should work now.

    @caleb-holos Smooth Sync is kept up to date with the latest release of Mirror on the Asset Store. We do not support the latest version of Mirror on github.

    @Yarwad2 It sounds like you've got the latest Smooth Sync but not that latest version of Mirror. You probably just need to update Mirror from the Asset Store.
     
    saukki likes this.
  16. witcherx

    witcherx

    Joined:
    Nov 10, 2018
    Posts:
    12
    Hi there,
    It seems the the new Ummorpg/Mirror has has modified the NetworkIdentity class and its throwing an error in SmoothSyncMirror

    Request your fix.

    Thanks in advance.

    MirrorSmoothSynchUpdate.jpg
     
  17. sabbath1989

    sabbath1989

    Joined:
    Jan 20, 2016
    Posts:
    8
    Do you know what would be good? if this asset had entered the cyber week discount !! :) just a tip lkkk
     
  18. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    789
    @witcherx There is a fix incoming. In the meantime you can just comment that line out if you're not using the Smooth Authority Changes feature and it won't hurt anything.

    @sabbath1989 I believe our price is too low already to be included in that sale. Sorry!
     
    zKici likes this.
  19. MOTYSHIZ

    MOTYSHIZ

    Joined:
    Apr 12, 2016
    Posts:
    2
    Hello, Noble Whale! I have been loving your asset so far.
    I do have a question that I am having difficulty finding answers for.

    I am working on a VR game with vehicles, but there can also be multiple players in a single vehicle.
    From my understanding and what I've gotten working so far, it is necessary to have 3 -4 tracking points for VR (Head, hands, perhaps playArea origin or root for height).
    As you may have already guessed, the issue I have with vehicles is making sure players appear to keep up with and stay inside the vehicles.

    This seems like it would require some clever use of "use Local Transform Only", and management of VR network tracked object hierarchies.
    I was hoping I could get more explanation on how this feature works.

    Is it basically just copying the visible transform values in the inspector?
    If there is any documentation on this matter, please let me know.

    Thank you very much!
     
  20. MOTYSHIZ

    MOTYSHIZ

    Joined:
    Apr 12, 2016
    Posts:
    2
    Nevermind, I figured it out!
    Turns out, my hierarchy wasn't getting properly synced between my remotes and clients. It was just my local VR set that was being modified.
    I now sync the parenting hierarchies via player custom properties and toggle on "use Local Transform Only".
    Works like a charm, and the players see each other in the vehicle together!

    Love you guys, thanks for making such a great asset with considerations like this.
     
    thegreatzebadiah likes this.