Help for A* Pathfinding System

Hi Everyone , i use A* Pathfingig 2.5 for my educational project… an enemy look for the player with Run Animation and find you , when enemy is near of your position the animation change to Idle but enemy move position is not stop ! how can i stop the transform enemy(or disable pathfingig) when enemy is near of Player ?

pardon me for bad English text :).

public void Start () {
		// Set all animations to loop
		animation.wrapMode = WrapMode.Loop;
	
		// Except our action animations, Dont loop those
//		animation["shoot"].wrapMode = WrapMode.Once;
		
		// Put idle and run in a lower layer. They will only animate if our action animations are not playing
		animation["Idle"].layer = -1;
		animation["Idle2Run"].layer = -1;
		animation["Run"].layer = -1;
		
		animation.Stop();
	}
	void Update () {
		LenEnemy=(fplayer.position-enemy.position).sqrMagnitude ;
	}
	
	public void SetSpeed (float speed) {
		if (LenEnemy<100){
			animation.CrossFade("Idle");
		}
		else{
		if (speed > minimumRunSpeed) {
			animation.CrossFade("Run");
		} else {
			animation.CrossFade("Idle");
		}
		
	}
	}
}

[/code]

Hi there,

I don’t have anuthing on pathfinding but you could probably look here for some information.

http://www.mrjoy.com/posts/37-Pathfinding-in-Unity

tnx men , but it dosnt help me :frowning:

look my enemy is moving on a path between to point…
is it possible to stop the enemy in middle of path before enemy arrive to end point…