AI FOLLOW BUG

Hi guys,

I create a AI follow script, bots start separed but they begin to begin to join and they create a queue.

Sugestions for they stop join?

CODE:

    var lookPos = target.transform.position - transform.position;
	lookPos.y = 0;
	var rotation = Quaternion.LookRotation(lookPos);
	transform.rotation = Quaternion.Slerp(transform.rotation, rotation, Time.deltaTime*10);
	
	moveDirection = Vector3(0, 0, 1); 
	moveDirection = transform.TransformDirection(moveDirection);
   	var nspeed = Random.Range(0.5 , 4.0);
    moveDirection *= nspeed/10;
    
    print(nspeed/10);
    
    grav+=applyGravity*Time.deltaTime*applyGravity;
	moveDirection.y -= grav; 
	controller.Move(moveDirection * Time.deltaTime *2);

	animation.Play("run");

there is the video of the my AI FOLLOW

http://www.youtube.com/watch?v=h0UOZ7SfLcI

If the enemies have their own colliders and rigidbodies they are colliding into eachother and preventing eachothers progress to the player. This is usually the way developers intend this to happen. If you don’t want the enemies to collide into eachother you could set their rigidbody components to IsKinematic and I don’t think they will collide any more.