HingeJoint2D sync.

Options
Ragdoll (HingeJoint2D actually) is most important part of my game.
What is the best way to sync (smooth and accurately) objects, which bonded with HingeJoind2D?
I try lerp their positions/rotations to ReceiveNext() values, but it's jerking (especially when ping > 100).
But one more problem is that I have to use WebGL -> have to use WebSocketsSecure -> ping always > 100, so what can I do?
How can predict correct positions of my rigidbodies using ReceiveNext() values + ping?
How can I use ping to my advantage?


More problem: HingeJoint pulls bodies back of lerped values :(
I can turn off HingeJoints on (!photonView.isMine) but then the are scattering in different directions.
Help :(

Answers

  • jeanfabre
    Options
    Hi,

    I would try to simply send the angle of the hinge joint from the owner and slaved instance simply matches that angle using a smoothing. this will prevent a lot of issues and will be a lot more efficient for bandwidths. since you only pass the angle, the consistency will be a lot better than passing the position and rotation.

    Bye,

    Jean
  • afa
    Options
    sad