[Multiplayer] Multiple players controlling a vehicle

Hello, I am developing a multiplayer game where multiple players can control (have different roles i.e. driving, firing the mounted gun…) a vehicle. Player characters can enter and exit the vehicle.
So far I thought of 2 ways of doing it:

  1. Split the vehicle into multiple parts (each of them are different pawns) and attach them together in a main class via child actor components. So players can possess different parts of the vehicle and control their respective pawns while being attached to the main pawn (driver for instance). In this way each player would own their part and replication of those would be handled in their pawns with replication system.

  2. Keep the vehicle as one class and implement a seat system in which, seats are added to the vehicle class as child actor components and players possess them instead. In this way each seat would have to send their actions to the server via RPC’s and they would be replicated to clients from there.

To me, second option seems cleaner to implement but I am worried about network performance of it.

Is there another solution which I couldn’t think of? What is the best way to go about it?

Hey there @kivir! Welcome to the community! So in my opinion it’d be easiest and cleaner to go with #2. Taking all player input and iterating on it on the server, then disseminating changes. It’s like you said however, not much of a way to predict how 3 other inputs are going on, so if anyone starts to have a worse connection it’ll be incredibly apparent. How bad is going to have to be tested however.

Thanks for the reply @SupportiveEntity! I guess I will be going with the second option and try to optimize the network performance. It seems like its the best option for now.