- Home /
Character Controller is not interacting with colliders.
I am currently in the process of building a game where I have a button that, when it collides with something with the tag "Opener" it would play an animation that opens a door. For now, to test the script, I just make it destroy itself when it follows the script. I tested it by putting it on a cube, and then putting another cube with the opener tag on it above it, so that when they collide one would dissapear. This worked. However, when I tried to do it with my character controller (the prefab that comes with Unity), it would not respond. I have to add a rigidbody to it, to the graphics, and even another collider but nothing worked. Here is my script:
function OnCollisionEnter (other : Collision)
{
if (other.gameObject.tag == "Opener")
Destroy( gameObject);
}
I feel that i should mention that my character does not go through the cube, it just refuses to work with the script.
Answer by Justin Warner · Jan 04, 2011 at 10:49 PM
Make sure the character has a collider on it...
the character controller has a collider on it in the prefab
Your answer
![](https://koobas.hobune.stream/wayback/20220613094016im_/https://answers.unity.com/themes/thub/images/avi.jpg)