Pathfinding and Network

Hi
I have done the “get started tutorial” and had no problems making an object moving around (grid graph).

I the tried to set up the same in a network game I have been working on - where each player that logged on could move around using the keyboard. With a little work I got the player to move around using my simple AstarAI script, but when another player logged on both went for the same target.
I’ve tried to constrain my movement call using networkView.isMine (as I did when the player used the keyboard), but it didn’t work as I hoped.

Now to the questions:

  1. Do I have to do something for the Seeker or other A* script to work in a network game?

  2. If the answer is No above, then I guess the problem is to isolate each players movement.

Hi

Could you post the code you are using for movement?

Hi
Sorry for replying so slowly. I was able to figure it out :slight_smile:
I checked if the networkview was the players (mine) when initializing seeker etc…and then it worked fine for all network players.

if(networkView.isMine) {
seeker = gameObject.GetComponent(“Seeker”);
controller = gameObject.GetComponent(CharacterController);
}