Hello everyone, I am trying to find the best method to allow several game objects to pathfind. It doesn’t been to be super amazing it just needs to work without the game object getting stuck along the way.
Originally I tried repulsion vectors but my objects could easily get stuck, especially when trying to get around longer objects.
I have also tried using the A* project, although my game objects never get stuck I can’t seem to have more then 7 or so objects pathfinding at anyone time without my frame rate completely dying.
Wait what!?! I had no idea, I thought it was pro only. Ill look into it but before I do I guess I should ask; is it any good? Like I said the A* project works but doesn’t allow me to have many objects using it, does the unity version allow for more objects to pathfind at once?
Hmm. I don’t know, but I would think so. You’ll have to test it out. One thing, it doesn’t test for dynamic objects like other characters, it only checks the mesh. You would need to cast a ray or something if they would be bumping into each other.
Another thing one guy did was cast a ray and got the object bounds to decide how to get around it. That would only work for fairly simple pathfinding, though.
I saw that earlier, Iv been playing with it for a while today. Its not perfect but easily good enough to get some serious fun at no real cost of performance. In a test I have 400 Objects Path finding and the game was still around 60 fps “To be fair all of the objects were quads but still a damn sight better then the 7 units at 3 fps”
Thank you all for your help, this will do very nicely!
The NavMeshObstacle implementation is terrible. We tried to use it for a Ludum Dare compo and the agent just bumped up against the obstacle continuously until he managed to work his way around it. Ended up throwing it out and rolling our own.