I had the same issue and what helped for me was setting the NavMesh’s Stopping Distance
property to some value (about 0.5
).
When Brian wrote in [RPG course lecture 37 - Player Shaking when approaching the Enemy - #4 by Brian_Trotter]:
You might check the distance to the target (
GetComponent<NavMeshAgent>().remainingDistance
) and compare it to an acceptance radius. Something smaller than the attack range, but larger than the NavMeshAgent’s radius.
I quite didn’t get where this should be applied to, though…