Open 70fu opened 8 years ago
This is something that I'm aware of as the bug appears in the Examples project. It was pretty low on my list of bugs to fix as I assumed it was on the Examples end and not the SharpNav end. I can look into this soonish.
I can confirm - this bug is present both in example project and custom project made from scratch. Is there a simple way to fix it?
My most recent changes to the pathfinding API (refactoring and cleaning things up) introduced alternate behavior where agents appear to be running back and forth on the boundary of the target polygon, I'll hunt down the source of the bug and include it in the next release.
I fixed this up locally - NavMeshQuery's InitSlicedFindPath earlies out too fast if the source and destination polyID's are the same Move the check down below after the query has been initialized.
When a new target is requested via RequestMoveTarget on the agent and the given target is on the same polygon of the navmesh as the agent, then the agent does not move.