Allow Units with Colliders to Go Through Each Other

Im trying to allow units not collide with one another with the tag “unit”. Plain and simple, so far i have this but its not working:

charcontroller = GetComponent<CharacterController> ();

//if collides with another unit such as itself
//pass through
void OnCollissionEnter(Collision col){
	if (col.transform.tag == "unit") {
		Physics.IgnoreCollision (charcontroller, col);
	}
}

An easy alternative would be to make the units on the same layer and disable collisions between objects in that layer

If you want to use Physics.IgnoreCollision (or Physics.IgnoreLayerCollision) then you should use it before a collision happens. Once OnCollisionEnter is called after a collision is computed and it uses this data. If you want to turn off collisions after the initial one you should make sure you objects are setup correctly so OnCollisionEnter is called.