Sync scene rigidbodies for newly connected players?

I honestly thought Photonview's did this, maybe they do, but I can't get them to work.

Basically I have one player start a room, with a scene that has a bunch of rigidbody boxes in it, if the first player moves them around, then another player joins, all the scene's rigidbodies are reset to their set positions. And aren't correctly synced for all players.

Is there something I'm missing here?

Comments

  • Also, the objects seem very jittery and laggy to newly connected players.

    Is there any way to improve these to not *suck*?

    Thanks!
  • Still having trouble with this..

    All I want to do is have some rigidbody boxes around the level that each player can push around, with out it lagging like crazy..

    I'd really love some input on this.
  • PhotonViews send regular updates but they do not smooth the movement for the frames between updates. The boxes will simply skip some distance whenever they get updates.
    It depends on your game how to smooth the movement best. You usually develop some script for that and observe that. Take a look at the "Demo Synchronization" (in the PUN package) for some start-points on how to do it in general.

    If your boxes are not synced when another player joins later, then something in your setup or scripts might be wrong. Check out the Demo Boxes (also in the package) and create a few of them. Whenever someone joins, all boxes are moved to where they should be (whenever I test).

    If all else fails, you can send us a repro project with steps how to reproduce this.
  • Hmm, well I've fixed the sync issue. When a new player joins, the positions are correct.

    But I'm still getting pretty bad jittery lag when someone tries to push a box. It lags, and is quite slow.

    I've looked at the example you said. And it seems like the best solution would be to Lerp the positions, but aren't the speeds sometimes off on that?

    As my game is heavily based on physics, I really need to get this sorted. At the moment I'm using the NetworkRigidbody script, posted here

    viewtopic.php?f=17&t=2447&p=11424#p11424

    Using that, most of the jitter is gone, now its just laggy, and slow on the incoming position update.

    Like, a player pushes the box, and about half a second later, it moves.
  • Half a second sounds like a lot.
    What is your ping?
    Did you try different regions?
Sign In or Register to comment.