How to stop gameobjects from merging.

My game objects, zombies, are merging when they all plot the same path to the player. I have both box colliders and capsule colliders on them but it doesn’t work. Is it because their copies?
Here is my script so far:

 var target : Transform; //the enemy's target
var moveSpeed = 2; //move speed
var rotationSpeed = 0.5; //speed of turning


var myTransform : Transform; //current transform data of this enemy


function Awake()
{
    myTransform = transform; //cache transform data for easy access/preformance
}


function Start()
{
     target = GameObject.FindWithTag("FirstPersonCharacter").transform; //target the player


}


function Update () {
    //rotate to look at the player
    myTransform.rotation = Quaternion.Slerp(myTransform.rotation,
    Quaternion.LookRotation(target.position - myTransform.position), rotationSpeed*Time.deltaTime);


 //move towards the player
 myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;

}

Do your zombie objects have a Rigidbody component on them? I think if you just have colliders, the physics engine won’t automatically help you out on the collisions. I’m still noobish, but I think you have a couple options:

  • Add a Rigidbody and Unity will stop merging the objects for you.
  • Set your colliders as Is Trigger in the Inspector, then handle the collision yourself in script using the OnTriggerEnter method.

If you already have a Rigidbody, then I’m not sure what could be happening. :slight_smile:

I added the rigibody but the zombies just seem to fall through my floor. I have no idea what im supposed to do. :confused: