Solar-System icon indicating copy to clipboard operation
Solar-System copied to clipboard

How to sync system gravity for multiplayer ?

Open olivvein opened this issue 5 years ago • 3 comments

Awesome project :) But i feel alone in this universe... I'd like to make it multiplayer. (Colyseus.io or Mirror, I tried both)

The server (one of the player) update nBodySimulation and send bodies transform relative to endlessManager to clients. The client receive bodies position and apply them to gameObject relative to endlessManager.

In spaceship in space, everything works fine. When trying to land, the ship don't stick to the planet, nor the player.

Any ideas?

olivvein avatar Dec 09 '20 15:12 olivvein

we should work together on solving this!

randoman911 avatar Dec 29 '20 06:12 randoman911

If you figure it out i think people would be more than happy to see how to do it as well!

thunderbear06 avatar Mar 17 '21 16:03 thunderbear06

Can you be more specific about ship not sticking to the planet? I reckon you should also send ship and player transform and velocities over to the server and clients. In a better server-client system, you would handle all ship and player acceleration on the server and clients would just send user input to the server.

Delofon avatar Mar 29 '21 22:03 Delofon