I’m working on a multiplayer game and am trying to get the pathfinding to work for host and all clients. Currently it all works great (I really love a*) with 1 tiny exception. On the host side I can have an object like a tree that is set as an obstacle, so the host can’t walk onto that node, but clients can still walk onto that same node. Is there a simple way to make the nodes work for multiplayer?
Hi
This package does not include any multiplayer code, however if you do the same graph updates on all clients the grid should stay synchronized.
Thabks for the reply! I actually figured out how to make it work in multiplayer and it is incredibly simple. Just in case you or anyone else wants to know how to make it work (not fully tested but it is currently working flawlessly) these are the steps you have to take:
1.) On the A* empty game object in the hierarchy, simply add the Network Identity component. Do not check Server Only nor Local Player Authority, both should be unchecked.
2.) Profit
Yes its that simple! I haven’t run into any problems with it, but I also haven’t done any intensive pathfinding with my game. I am using the grid graph, so I’m not sure if that will make a massive difference but I wouldn’t think it would
Oook. I have no idea how that manages to solve it, but if it works, then go for it.
I don’t either but I’m not going to question it haha