Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

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

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

  1. VrTechEx

    VrTechEx

    Joined:
    Aug 4, 2013
    Posts:
    30
    @Clonkex
    That's what I tried to do today and you are my lifesaver! Thank you !!!
    However, I found it acts a little bit weird. It's not as smooth as UNET. I don't know why :(
     
    Last edited: Jan 1, 2019
    Clonkex likes this.
  2. TiToMoskito

    TiToMoskito

    Joined:
    Jan 28, 2014
    Posts:
    34
    @Fuestrine: Could you make a TNet Version please?
     
  3. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @Rexima
    Unfortunately I'm not looking to add any direct "plug n play" solutions for other networking systems at this time.

    The PUN and PUN2 versions convert to a byte array to send over the network though. Most networking systems can handle byte arrays so you can probably convert the PUN or PUN2 version to use TNet but it would take some work. I'd be happy to answer any specific questions you may have while you try to convert it though. I try to comment all the code fairly well.

    @VrTechEx
    At what points is your conversion to Mirror not as smooth as the UNet version? Just in general straight line jitter type stuff? You can try lowering your EasingSpeeds and TimeCorrectionSpeed for more general smoothness, but it will start being less reactive if you put them too low.
     
    BiosElement likes this.
  4. VrTechEx

    VrTechEx

    Joined:
    Aug 4, 2013
    Posts:
    30
    @Fuestrine

    It works better!
    Another question, I want to achieve the physic that both players can collide to a box and push the box by the rigidbody, however, it only works on the Server side. For the Client side, he has a hard time pushing the box. Any ideas?
     
  5. TiToMoskito

    TiToMoskito

    Joined:
    Jan 28, 2014
    Posts:
    34
    @Fuestrine
    Thanks, i made myself a TNet Version, but i cannot safe the Editor Settings on my prefab. Im using the latest unity version.
     
  6. Chris8115

    Chris8115

    Joined:
    Jan 19, 2015
    Posts:
    10
    Hi, I'm getting this error whenever I spawn in my player (I'm using a custom spawning method that spawns them after the scene loads when the player selects their character). Also my players movement is not being updated over the network, the characters just sit still on any client that isn't the local one.

    Exception in OnStartServer:Object reference not set to an instance of an object at Smooth.SmoothSync.OnStartServer () [0x00079] in C:\Users\chris\Desktop\Unity Projects\EmberdoomEngineUpgrade\WaveSurvivalE2\Assets\Smooth Sync\UNet\Smooth Sync Asset\SmoothSync.cs:1682
    at UnityEngine.Networking.NetworkIdentity.OnStartServer (Boolean allowNonZeroNetId) [0x00140] in C:\buildslave\unity\build\Extensions\Networking\Runtime\NetworkIdentity.cs:335
    UnityEngine.Networking.NetworkServer:SpawnWithClientAuthority(GameObject, NetworkConnection)
    SpawnGamePlayer:SpawnPrefabForPlayer(UInt64, Int32) (at Assets/_Prefabs/NetworkMessagesCustom/SpawnGamePlayer.cs:128)
    SpawnGamePlayer:CmdSpawnAvatar(UInt64, Int32) (at Assets/_Prefabs/NetworkMessagesCustom/SpawnGamePlayer.cs:143)
    SpawnGamePlayer:InvokeCmdCmdSpawnAvatar(NetworkBehaviour, NetworkReader)
    UnityEngine.Networking.NetworkConnection:TransportReceive(Byte[], Int32, Int32)
    HeathenEngineering.SteamTools.Networking.HeathenSteamLobbyManager:Update() (at Assets/_Heathen Engineering/Steamworks/Framework/Network/HeathenSteamLobbyManager.cs:208)
     
  7. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @VrTechEx
    For physics to work well you are going to have to do them all locally on one machine. Every object would be owned by the server typically (games like Rocket League).
    A way to not do that is you could send over an RPC on collisions to have the server object move when a client object hits it.
    Another probably awful way unless your game can specifically do it is: You could change owners just before it's hit so it's just a client hitting a client object or a server object hitting a server object, which would physics fine.

    @Rexima
    Probably something wrong with the editor script you made for TNet. The UNet and Photon versions seem to be working for me, let me know if you mean those aren't working either.
    You could just get rid of the editor script entirely and refer to the comments written inside them. Otherwise, probably try copying over the editor script again and looking at the differences between the PUN and UNet version to see what you may need to change for TNet.
     
  8. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @Chris8115
    I'm not seeing SmoothSync.cs:1682 lining up with anything. Try updating to the latest version of SmoothSync, which is 3.11, if you aren't already using it.

    If you are on the latest, can you quote me the line that it's referring to for you?

    If you are using an older version of SmoothSync that you've modified and don't want to upgrade because it'd be a pain, just copy over OnStartServer() from the latest SmoothSync and see if that solves the issue.

    Let me know how it goes or if you have any questions.
     
  9. Chris8115

    Chris8115

    Joined:
    Jan 19, 2015
    Posts:
    10
    Hi I think I've narrowed it down to line 1659
    if(!NetworkManager.singleton.client.handlers.ContainsKey(MsgType.SmoothSyncFromServerToNonOwners))

    And i'm getting this error

    Exception in OnStartServer:Object reference not set to an instance of an object at Smooth.SmoothSync.OnStartServer () [0x00079] in C:\Users\chris\Desktop\Unity Projects\EmberdoomEngineUpgrade\WaveSurvivalE2\Assets\Smooth Sync\UNet\Smooth Sync Asset\SmoothSync.cs:1659
    at UnityEngine.Networking.NetworkIdentity.OnStartServer (Boolean allowNonZeroNetId) [0x00140] in C:\buildslave\unity\build\Extensions\Networking\Runtime\NetworkIdentity.cs:335

    It may have something to do with the networking system I am using, I'm using the Heathen Steamworks tools on the unity store and I think that changes the way messages are sent so I've also reached out over there to see if they have a solution.
     
  10. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @Chris8115
    Yeah, it looks like some things are NULL that are normally not null in only UNet.

    I haven't seen this issue in UNet, and I don't see if when I spawn an object after scene load.

    Hopefully they can tell you how you'll need to change your message registering but some other ideas may be:
    Maybe you can wait a few frames and then do the code in OnStartServer() if the other system needs some frames to set some things up.
    Maybe you can convert it to use RPCs so it'll work in Heathen Steamworks. PUN and PUN2 also convert to a byte array before sending over the information so maybe you can look at that for more information.

    Let me know how the Heathen Steamworks reply goes or if you have any questions.
     
  11. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @Chris8115
    Actually, try this first. Switch that line it errors on with this:

    if (NetworkManager.singleton && NetworkManager.singleton.client != null && NetworkManager.singleton.client.handlers != null)

    and see if that works with Heathen Steamworks by forcing it to go into the section below it.
     
  12. Chris8115

    Chris8115

    Joined:
    Jan 19, 2015
    Posts:
    10
    Hi thanks for the help, I checked with them and I also realized that the Heathen Tools don't use the standard network manager and they have their own method for registering messages, I'm pretty sure I will be able to tweak things to work for that system, thanks again for your help :)
     
  13. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @Chris8115
    If you use that last line I sent you, it will no longer try to use the NetworkManager there.

    But also, registering the messages their way is probably the best way to not have any other issues anyway.

    Let me know if you have any other questions. Cheers.
     
  14. Chris8115

    Chris8115

    Joined:
    Jan 19, 2015
    Posts:
    10
    Ok cool I'll try that out thanks so much
     
  15. Clonkex

    Clonkex

    Joined:
    Jul 31, 2012
    Posts:
    11
    Nice, I'm glad it helped! :cool:
     
  16. TiToMoskito

    TiToMoskito

    Joined:
    Jan 28, 2014
    Posts:
    34
    @Fuestrine

    I just tested your example with the latest unity version, and cant save there the prefab too.
    Seems to be a bug in your editor script?
     
  17. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @Rexima
    Ah, yeah. It looks like Unity changed some things with how prefabs work in 2018 3.0. It saves game objects in the scene but not prefabs for some reason. Thanks for bringing it to my attention.

    For now, you can delete SmoothSyncEditor and all will be saved. I'll take a deeper look at it this weekend and get back to you when I find the solution.
     
    Last edited: Jan 5, 2019
  18. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    160
    @Fuestrine I tested Smooth Sync with the Demo RPG movement of PUN Classic to see if it could solve some of the jerky movement issues I always notice with Photon. I used the default settings on Smooth Sync PUN and it seemed to clear up some of the issues. However, I'm still noticing a pretty big rubber banding effect when the character switches directions and runs in the opposite direction and sometimes mid run in straight direction. To your knowledge is there anyway to fix this or is this just part of dealing with Photon networking. No matter which settings I try there is always some rubber band/stutter. I tried messing around with other settings with different combinations and it never got any better, only worse on some variations. This is why I tend to avoid multiplayer games with unity, I can never achieve any sort of professional looking smooth movement.
     
    Last edited: Jan 6, 2019
  19. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @JRRReynolds
    I'm not sure what the exact issue is but you can get more reactivity out of it by raising the send rate.

    PUN has a default send rate of 10. You can up the send rate of PUN (I think it's OnSerializationRate or something similar with PUN). Then you can lower the InterpolationBackTime and it will be a lot more reactive and have less rubberbanding. You'll probably want the InterpolationBackTime to be greater than 1 / Send Rate in order to always be interpolating. So if you can up your send rate to about 30 for a fast twitch game, you can have your InterpolationBackTime at .033 or so.

    To get more reactivity and less rubberbanding, you can raise the EasingSpeeds to 1 as well. You can also raise the TimeCorrectionSpeed, but probably not too much or you'll see jitter, and you'll get more reactivity too.

    Let me know if none of that helps and I'll look into the Demo RPG of PUN classic myself and see what I can find.
     
  20. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    156
    Hi, I just started using SmoothSync (and NAT Traversal) and found both extremely useful, so thanks for that!
    I am making a game where the player pilots aircraft, and so I'd like to take advantage of the velocity driven sync feature to smooth out the result. However, my aircraft objects don't use Rigidbodies. Is it possible to still sync via velocity? Will SmoothSync work with a kinematic Rigidbody? Thanks!
     
  21. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @Fewes
    No, you cannot use the Velocity Driven Syncing without a Rigidbody (at least on the non-owner). The way it works is it sets the velocity on the non-owned object to get it to move instead of changing the position directly. This is so it is always in a lock step with the physics and ends up looking good.

    A Kinematic Rigidbody on the non-owners would not work either as you'd want the Rigidbody to move when velocity changes and when it is Kinematic it will not be affected by physics.

    I haven't tried this, but you may be able to just have the Rigidbody on the non-owner aircraft. Then UseVelocityDrivenSyncing will use the position sent from the non-rigidbody (owner) to make the rigidbody (non-owner) move around by velocity.

    Let me know if you have any questions.
     
    Last edited: Jan 7, 2019
  22. VrTechEx

    VrTechEx

    Joined:
    Aug 4, 2013
    Posts:
    30
    Can you explain more a little bit for the way I have to do it like how I sync the object in the game?
     
  23. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @VrTechEx
    They could all be done so many different ways. Those were three different options too. I'll try to explain more fully.

    Option 1: Make everything owned by the same system. (Usually the server)
    Place a networked ball in the scene already with LocalPlayerAuthority checked, this networked ball will be automatically owned by the server.
    Hit this networked ball with your server player. You will see the hit perfectly fine on clients. This is because the networked ball and your server player are owned by the same system (the server). You can make your entire game like this and just send movement to the server from your clients to move your client players around and the client players (actually owned by the server) will be able to hit things fine.
    A drawback of this is you will have to wait a bit for your client player to move since you have to send an RPC to the server and wait for the message to get back to you for your player to actually move.

    Option 2: Fake the collisions with RPCs.
    Hit an object, send over an RPC to AddForce() to owner of the object you hit so that it can then move on all non-owners. So if Player 2 hits Player 1, Player 2 will send over an RPC to the server to tell player 1 to AddForce() in some direction that makes it look like it got hit.

    Option 3: Change authority constantly based on whatever is best for your game so that it becomes like Option 1 where objects owned by the same system are always colliding.

    Let me know if you have any questions.
     
    Last edited: Jan 6, 2019
  24. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    160
    @Fuestrine Thank you for the suggestions. I tried implementing them and it did help a bit (increased send rate and serialized send rate to 30 and lowered IBT to 0.04). I still get hiccups; they are less noticeable than before. I will try pun2 and porting smoothsync to tnet to see if I can get better results there. I don't mind having a laggy player here or there but hiccups going on throughout the match is still too much. But in either case this is a lot better than what is included with photon to begin with, so thanks for offering options that help resolve the issue!
     
  25. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    Version 3.12 is now on the Asset Store.

    Change log:
    • Reworked the editor scripts so they work in 2018 3.0.
    • Fixed issue with idling when not syncing rotation.
    • Child rigidbody velocity syncing fix.
     
    Last edited: Jan 9, 2019
  26. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @Rexima
    The editor fix is now up on the Asset Store. Thanks for letting me know about it and let me know if you have any questions, issues, or comments.
     
  27. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @JRRReynolds
    It does look like something strange is going on in this PUN scene here. I'll take a poke around and get back to you with what I find.
     
    Last edited: Jan 7, 2019
  28. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @JRRReynolds
    Thanks for letting me know about the problem. I believe it is solved but I'm heading off for the day so I didn't get time to fully test yet to see if I affected anything else.

    Change the code block starting on SmoothSyncPUN line 775 with this:
    Code (CSharp):
    1. if (restStatePosition == RestState.JUST_STARTED_MOVING)
    2. {
    3.      sendingTempState.state.position = lastPositionWhenStateWasSent;
    4. }
    5. if (restStateRotation == RestState.JUST_STARTED_MOVING)
    6. {
    7.      sendingTempState.state.rotation = lastRotationWhenStateWasSent;
    8. }
     
    Last edited: Jan 7, 2019
  29. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    160
    @Fuestrine That actually looked like it solved most of the issues. Thank you very much.
     
  30. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @JRRReynolds
    Awesome, thanks again for letting me know. I didn't see any other issues from that fix so I pushed it to the store. It should show up on the store in a day or two. Feel free to point out any other issues you may see, or even just ease of use or anything. I'm always happy to make my products better. :)
     
  31. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    Version 3.13 is now up on the Asset Store.

    Change log:
    • Fixed issue with coming out of rotational rest while not at positional rest and vice versa.
     
  32. Hawkadium

    Hawkadium

    Joined:
    Oct 7, 2014
    Posts:
    26
    @Fuestrine are you able to comment on the compatibility of SmoothSync with MMORPG Kit from Suriyun? They are not on Unet.
     
  33. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @Hawkadium
    It won't work out of the box with MMORPG Kit from Suriyun. But as long as you can send over a byte array, I would think you would be able to convert the PUN or UNet version to MMORPG Kit. It will require some work from you though.

    I'm happy to answer any specific questions you run into along the way too if you decide to go that route.

    Take a look at the serializing/sending and receiving/deserializing in the PUN version here. It should give you a good idea of if think you can do it or not: https://forum.unity.com/threads/rel...educing-bandwidth.486605/page-11#post-3888424

    PUN is a little weird in that it's sending in a networked update loop so ignore that bit, but the checking if it should send, then serializing and sending it, then receiving and deserializing it so SmoothSync can use it are all the important bits. You can probably just take those checks and conversions and put it in the UNet version and convert or just convert the PUN version itself.

    Let me know if you have any other questions.
     
    Last edited: Jan 13, 2019
    Hawkadium likes this.
  34. rafaelmfernandez

    rafaelmfernandez

    Joined:
    Aug 11, 2013
    Posts:
    50
    Hey, im trying to follow your tutorial video and whenever I add smooth sync it also adds a deprecated network identity component. When I go to add the smooth sync component to the photon view observed components it just shows up as None.
     
  35. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @rafaelmfernandez
    I think you are using the UNet version.

    Go to the "Other Networking APIs" folder and extract the PUN or PUN2 version, whichever you use. The SmoothSync component will then be called SmoothSyncPUN or SmoothSyncPUN2. You can also probably delete the UNet folder entirely if you don't use UNet.

    Let me know how it goes.
     
    Last edited: Jan 17, 2019
  36. rafaelmfernandez

    rafaelmfernandez

    Joined:
    Aug 11, 2013
    Posts:
    50
    Gotcha, thank you! Ill give that a shot
     
  37. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    160
    @Fuestrine I noticed there is a little bit of lag when a character at rest starts moving. The character will jerk to the next position even at 20 or 30 updates per second. If the character continues moving and suddenly changes direction this doesn't occur (thanks to your tips!) but starting at rest then moving in any direction at a rapid pace causes a sudden jerk in that direction. Does this have something to do with RestState At Rest and Just Started Moving in your opinion? I was wondering if I can get around this issue by forcing the character to always be considered moving.
     
  38. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @JRRReynolds
    Yeah, it probably would fix itself if you ignored all RestState logic. I am seeing the same issue though, completely my fault. I'll look around and see what I can find. I should be able to get this fixed up today.
     
  39. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @JRRReynolds
    I was actually looking at the PUN Transform View when I wrote that. I'm not seeing this issue in the Demo RPG Scene for PUN with SmoothSync default settings.

    Is this happening every time you start moving from rest or every now and then?

    Does this happen in the PUN Demo RPG Scene with default SmoothSync settings for you?
    If not, let me know what might be different from this scene and yours so I can try to recreate the issue on my end.

    I think you can just comment out SmoothSyncPUN.cs lines 679 to 754 to ignore all RestState logic. If you do this, let me know if it fixes your problem or not.
     
    Last edited: Jan 22, 2019
  40. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    160
    @Fuestrine Thanks for your response! It is present in the pun demo scene but I think the animations help to make it less noticeable. I disabled animations in my test scene just so I can get a feel for the motions and sync. Taking your suggestions, I blocked out the relevant line of codes and forced send update on rotation and position by manually setting them to true just for testing purposes (instead of checking shouldsend) and this for the most part solved the issue (before it was occurring most of the time, after the fix I would only notice the stutter maybe 1 out of every 5 times which just could be normal lag).

    This quick hack (at the expense of extra bandwidth) introduced some stutter sometimes at the end of the movement but I suspect that is because I am overwriting any state logic. I think I will probably spend more time and use a combination of the original code with having position sent more frequently. I think the rest states helped I just have to custom tune it a little bit to reduce the start/stop lag. That coupled with some other tricks should disguise pretty much all lag in movement.

    Thanks for your advice and once again great asset. It puts any other built in networking movement sync to shame and encouraged me to finally finish working on my multiplayer game.
     
  41. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @JRRReynolds
    I'll have to take a deeper look at it then. I think I can see what you are talking about in that scene. I'll get back to you with what I find.
     
  42. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,423
    @Fuestrine I just purchased SmoothSync, thanks for the great asset so far :)

    I'm using it in my racing game and already the results are a lot smoother!

    Unfortunately I still have yet to solve the dreaded mismatch of two vehicles racing next to each other at speed. On one client the local player seems to be ahead, but on the other, the local player seems to be ahead.

    upload_2019-1-26_14-17-44.png

    I've played around with settings for over an hour now, and I've gotten the best results so far, but they're not perfect, I'm wondering if you have any other suggestions I could do to improve this further? Here are my settings...

    upload_2019-1-26_15-3-33.png

    Also how do I sync child objects with PUN? I don't see an option for setting the child game object when I add a second SmoothSyncPun object.

    Thanks!
     
  43. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @Meltdown
    Increasing your Send Rate should help. I think in PUN it's PUN.onSerializationRate or something like that.
    Try turning VelocityDrivenSyncing off (one of the more important things you can do probably). If you want to use it anyway, lowering MaxPositionDifference might help.
    Increasing your TimeCorrectionSpeed should help too. It will be not smooth at too high of numbers though so you'll have to see where the limit is. (I would think around .25 would be pretty reactive without being too jumpy, but try going as high as possible)
    You might be able to get away with a PositionLerpSpeed of 1 as well.
    I would also set WhenToUpdateTransform to Update (if Update() typically happens more often than FixedUpdate() for your game's settings that is).
    Try turning Compression off too if that's on.

    For PUN children, you can just add the SmoothSync script to the child and then drag it onto the Photon View's Observed Components and it will be synced.

    As for generally being a bit off on two clients, it's just never going to be perfect. Even in games like Fortnite I see the positions being off with my buddy's position. At a speed of 65mph, being just three frames off at 60fps would put the vehicle about 1.5 units different from where it actually is so it's just hard to be super accurate.

    If you think it's less accurate than what you were using before (with VelocityDrivenSyncing off and trying the things above) let me know and I'll see what I can find with making it a bit more accurate in a situation like yours.

    Let me know if you have any more questions.
     
    Last edited: Jan 26, 2019
    Meltdown likes this.
  44. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,423
    Wow great support, thanks I'll give those a try tomorrow and report back with my findings!
     
  45. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,423
    @Fuestrine I didn't have much luck with the changes unfortunately, although its slightly better though after a few minor tweaks. Its at the point now where I'm quite happy with it, I'm testing with a latency of 100ms inbound/outbound using Clumsy and its certainly reaonsable :)
     
  46. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @JRRReynolds
    Thanks for letting me know about the issue. The fix should show up on the store in a few days whenever Unity approves it. I usually send it to the person's inbox so they can have it immediately, but it looks like your profile is completely private. Send me a PM or an email and I can get it to you faster.
     
    Last edited: Jan 29, 2019
  47. Lachee_

    Lachee_

    Joined:
    Aug 5, 2013
    Posts:
    2
    Im having some trouble getting interaction between a spaceship and networked astroids to behave correctly. While its all smooth on the host end and looks perfect, when a connected client collides with a asteroid, its as if it hits a brick wall for half a second.
    Is there anyway to fix this so its seemless?
    What are recommended configurations?
    If it helps I can send the entire project. Its literally just the Mirror networking stack and some cubes with rigidbodies.
     
  48. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    @Lachee_
    In order to get good physics interaction you will need to have everything owned by one system. Physics games like Rocket League will have everything owned by the server.
    One trick to have things collide that are owned by separate systems is to send over an RPC on a collision to AddForce().
    Lowering your InterpolationBackTime and raising your PositionLerpingSpeed will probably help a little with your scenario but it won't solve the issue.
    Let me know if you have any questions.
     
    Last edited: Jan 31, 2019
  49. antsonthetree

    antsonthetree

    Joined:
    May 15, 2015
    Posts:
    61
    I just purchased this and spent about 15 minutes following the instructions to convert it to use Mirror. Slapped it onto my rigidbody prefab and the difference is night and day. Works great! Thanks!
     
    Fuestrine likes this.
  50. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    429
    Version 3.14 is now up on the Asset Store.

    Change log:
    • Fixed faster than should be movement between send states on coming out of rotational and position rest. Was more noticeable at low fps and send rates.