Unity3d request position at time


i have this situation when player click on some position on the ground, then he moves there (because server said so :D).
I wish to know how to request this player current position when new player arrives, because right now, when new player appears then he see his final position instead of current position of this current moment. Please check the gif below.

Please explain me how to keep server updated of the players positions.
I wish i dont have to spam server with actual current position's all the time.
How to do that?



I'm totally new to Colyseus but I've worked on multiplayer games for a while, and here is my idea about your problem: server calculate, client do.

In your particular scenario, it should be step like these:

  • Player clicked on location, Client send the action (clicked, [location]) to server
  • Server process, so at time 0.2s, player model will be at x, which direction like so, speed like so, send that information (0.2, [x], [dir],[speed]) to user
  • Client display those information, and wait for next move from server

Then, no matter how many clients connected to your server, they will received the same game state

But i am using NevMashNavigator in Unity3D Client.

To do in the way you told me i should move that logic to the server and server should push the player forward in some direction, i am right?

@halome Yup, do it like that you can raise the security bar of your game, if you want to use navagent, you should take a look at Unity headless master server :D