Enable/Disable Colliders

Is there any way to dynamically turn on and off a collider using scripts?

I want an object to be able to fall through the character, but then stop when it hits the floor.

collider.active shuts down the entire object since its turning the gameObject on and off.

Is there something specific to control just the collider?

Or better yet - simply have a collider ignore specific colliders.

That’d be cool to know how to do (if possible) as well.

Physics.IgnoreCollision

http://unity3d.com/Documentation/ScriptReference/Physics.IgnoreCollision.html

sweet

Little problem:

Physics.IgnoreCollision does not seem to see a CharacterController as a collider.

this is my code:

var character : Transform;
var plane : Transform;

function Update()
{
Physics.IgnoreCollision(character.collider, collider);
Physics.IgnoreCollision(plane.collider, collider);
}

Any idea what the problem is? Anyone?

IgnoreCollision currently doesn’t work for character controllers.

Ahh. Ok.