Is there a way to deal with dynamic rigid bodys

So a have a 2d game where a player can control a ship and i want the other players to be able to push the ship but i cant take away the autorit from the player who is driven the ship so can someone help me with this?

Answers

  • Any physical interaction is kind of hard to do. It must look correct and cope with random players' lag. Depending on how precise you want the interaction to be, this can be tricky.

    You could send RPCs to the player who controls the ship. That user will move the ship and that in turn will update the others.

    All RPCs send a server timestamp along of the time when they were called. You could use this to compensate lag (and move the ship further when the rpc is late) or skip the rpc if it's really late.