I’m having trouble with a car that goes through a collider that is marked as trigger. Now I check in the car script the “OnCollisionEnter” event and check whether I go through the trigger collider. What happens now is that onCollisionEnter is triggered multiple times.
I would have expected to get that one called only 1 time, as the car comes into the volume of the trigger collider. I can’t get my head around what I did wrong. Isn’t a collisionEnter call to be supposed to be called only once, exactly one time when the entering happens and not multiple times?
Oooohh stupid me btw, of course there have been multiple objects going into the trigger… the left wheel, the right wheel, the body… ahhhh that is so emabarissing to me that I didn’t think of that… I saw it only as “one” car, not as multiple objects during test… haha, but anyway, now it works!
Hey Martin!
Your post is still helpful after 12 years. Many thanks for your feedback. I ran excatly into the same issue. I also attached multiple objects detecting multiple collisions altough there is presumably only “one” object. I fixed it now and it works! =)
Thankyou so much. for any other users out there with the same problem to this day, basically the OnTriggerEnter() function is called for every collider entering the trigger which is a child to the parent object containing the script with the OnTriggerEnter() method in it. Hopefully this is helpful.