Lecture 53 tolerance parameter

hi there,

when my tolerance parameter was set to 1f, the fighter moved from 0 to 1 and was not able to continue. when I changed the tolerance parameter to 2 it worked fine, but I think I don’t understand exactly the idea of this parameter . I mean I do understand that it is the distance between the next transform position and the enemy but why this bug occur when the tolerance parameter was set to 1?

There can be a few reasons for this.
Your Stopping Distance in the NavMeshAgent could be set too high, so the agent stops before it gets to the point, but the tolerance is tighter.
More likely, the Patrol Point itself is not exactly at ground level. The distance calculation is from point to point, and our character’s origin is on the ground.

Generally speaking, we do not recommend a tolerance of less than 2, certainly no less than 1.5.

thanks. This things in unity can be sometimes very frustrating because it is not something in the scripts and it can take you some time to figure that out.

Privacy & Terms