I’ve got agents that randomly wander around on a recast graph. The recast graph is evaluated (using graph update objects) at runtime in chunks, in case that may provide insight.
These agents use a RichFunnel, and constantly call funnel.ClampToNavmesh on their position, to ensure they don’t stray off.
What seems to be happening though, is that occasionally they’ll just teleport from location to location. I’ve confirmed the jump is happening within ClampToNavmeshInternalFull, usually with a distance of 5-15m or so (between the input Vector3, and the output Vector3).
I’ve added some logs to get a bit more information generated within that method.
closestIsInPath is usually true, but not always. The graph is always the same (I only have one graph).
I’m completely stumped on this one, and have spent hours trying to debug the issue. Whenever an agent teleports by this bug, it is to another point on the navmesh; it’s not into the air, or into walls. It also often seems to teleport back to the same points, though that could simply be due to limited space.
I’ll continue looking into this tomorrow, but thought I’d drop a query here in case it’s a problem with an easy solution or debugging strategy.