- A* version: 5.3.1
- Agents Navigation version: 4.0.12
- Unity version: 6000.0.31f
Hello @aron_granberg, I found a problem when using A* star project in conjunction with Agents Navigation package . Although it seems like it’s not crashing anything it is reporting multiple errors, which is kinda annoying. The problem is related to the Recast graph and NavmeshCut component.
I was able to reproduce the problem in empty project and I recorded the video which you can find HERE: https://www.youtube.com/watch?v=e9zNIgQjvQo
To reproduce it too please follow these steps:
- Import A* Pathfinding Project Pro and create Recast graph on selected surface
- Import Agents Navigation, create agent with these components: Agent, Agent Cylinder Shape, Agent Astar Pathing - probably not even all of these are needed in order to reproduce the bug… in the video the agent is BLUE CYLINDER
- Create target (GOLDEN SMALL CUBE in the video) for the agent, make simple script for the agent to follow the target (in update I have this: IF golden cube destination changed, THEN _agent.SetDestination(goldenCubeTransform );
- Create another cube with NavmeshCut component from A* package. This cube will do navmesh cutting, on the video it is represented by RED BIG CUBE
- Start the scene, you can see agent moving towards the target. Now move the navmesh cutter object, so the navmesh and path towards the destination are recomputed
- Sooner or later errors appear (see video for more info): InvalidOperationException: Couldn’t find a portal from Pathfinding.TriangleMeshNode Pathfinding.TriangleMeshNode
I was trying to reproduce this behaviour on your A* proj Recast3D sample with no luck (no error appearing no matter how crazily I moved with navmesh cutter), so I presume that the problem is tightly connected with Agents Navigation package usage.
Could you please take a look on this, eventually also collaborate with Lucas (Agents navigation creator) to solve this issue? Lucas has been already notified about this issue.
Thank you in advance for your time and effort!