SharpNav icon indicating copy to clipboard operation
SharpNav copied to clipboard

Agents do not move when requested target is on the same polygon

Open 70fu opened this issue 9 years ago • 4 comments

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.

70fu avatar Feb 08 '16 17:02 70fu

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.

Robmaister avatar Feb 08 '16 21:02 Robmaister

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?

kulesz avatar Apr 24 '16 19:04 kulesz

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.

Robmaister avatar Apr 29 '16 09:04 Robmaister

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.

TomKuhn avatar Jul 03 '22 19:07 TomKuhn