- Home /
onTriggerEnter Won't Work
There are a lot of questions like this, but they were all resolved by adding a rigidbody, which didn't help in my case. I'm working with an object with a sphere collider and rigidbody, and my program isn't responding to either onTriggerEnter or onCollisionEnter. The issue is that the function isn't being called. All of the objects I've tried to collide with have kinematic rigidbodies (though it still didn't work when I disabled kinematic) and their colliders are triggers. I have tried discrete, continuous, and continuous dynamic collision detection: nothing. What am I doing wrong?
void onTriggerEnter(Collider other) {
Debug.Log("Triggered");
}
I've the same problem. The object have a rigidbody, and i correctly wrote
void OnTriggerEnter(Collider col)
{
Debug.Log ("pick");
}
What am I doing wrong?
$$anonymous$$ake sure the collider is set to be trigger (and you should make new question and not post as answer to an existing one.
Answer by gfoot · Jan 28, 2014 at 09:16 PM
It needs a capital O, i.e. OnTriggerEnter.
i've the same problem but OnTriggerEnter is correctly wrote and the gameoobject have rigidbody
Your answer
![](https://koobas.hobune.stream/wayback/20220613131925im_/https://answers.unity.com/themes/thub/images/avi.jpg)