PathManager pathMan = gameObject.GetComponent().Agent.PathManager; Vector3 dirToTarget = pathMan.moveTarget.TransformTarget.transform.position - gameObject.transform.position; if ( dirToTarget.magnitude <= pathMan.closeEnoughDistance ) {<br />// we made it! }
however, we never make it. The agent stops slightly before the close enough distance. (for example: my C.E.D. is 0.1 but the dirToTarget.magnitude is 0.233f).
Is there a handy callback or otherway to identify when the agent gets to his target location and stops?
Also, I tried placing the code above in a [code][/code] to no avail. Mind mentioning the correct syntax?