Navmesh Agent - all Clients are moved by Server - Issue

Hello,

Trying to get into the advanced tutorial. I followed the advanced tutorial but when I get to spawn my players, I can't move my client's player. If I move the player with the server window, I get both characters moving to the same spot.

On the client side, I see the player teleported to the server player destination and I can see the server's player moving to the same point.

I didn't use the player motor script or controller, as I use the agent.destination to move my character around.
I also disabled the root motion.

I can submit my script later on, but basically (I hope) I only changed the ExecuteCommand method.
I created a command with input (ismoving (bool) and destination (vector)) and the same for result.

In the script:
I use in the input a bool and a vector (but I'm not sure I understood correctly what exactly I need to do).
The animation plays correctly by setting the bool in the Update and updating the bool with the input / ExecuteCommand, but I can't make it work for the movement.

I guess I should post my script? Is there anything else that sounds obvious to you? :)

Thanks!

Comments

  • You should complete the tutorial and fully understand how authoritative movement works before moving onto navmesh.
  • So I was able to make the movement works on the client and the server.
    The remaining issue is that when I move the character on the server, the character on the client is shaking a lot (stays at the same spot, but is vibrating).
    If I move the character on the client, the character on the server is doing the same thing.

    Am I sending transform data too many times ?
    What am I missing?
    Could you point me in the right direction?

    Thanks!
  • You should complete the tutorial and fully understand how authoritative movement works before moving onto navmesh. You are probably not understanding how it works. You can also read here for an in depth explanation https://docs.google.com/document/d/1yjPE69MdT3BhY-HjARFdqkIpqXujORLsKiX6B8GWoLI/edit#heading=h.cf8bgjjxjtu5
  • Thanks for the doc.
Sign In or Register to comment.