- Home /
Ignore collision, but raise event.
Hi, I'm still new to Unity so bear with me.
I'm trying to create a sort of racing game where the 'track' has waypoints scattered throughout. I want to be able to respond to when an object (rigidbody) passes through a waypoint. The problem is, that the only way (AFAIK) to respond to a collision is by using a collider, but rigidbodies since can't pass through colliders objects won't be able to pass through the waypoints!
Is there any way for me to create something like an invisible collider, which wouldn't affect the physics simulation but would allow me to detect the collision easily (you know, without having to make my own primitive boundingbox collision code)?
I'm not new to game development, but I am new to Unity. Any guidance would be greatly appreciated!
Answer by DaveA · Aug 20, 2012 at 02:19 AM
Set the waypoint's Collider's 'is trigger' to true (checkbox)
Also keep in $$anonymous$$d that you won't get OnCollisionEnter messages. Triggers have their own set of callbacks:
OnTriggerEnter
OnTriggerStay
OnTriggerExit
Just check the Collider page and check the "messages sent" section.
Your answer
![](https://koobas.hobune.stream/wayback/20220613075911im_/https://answers.unity.com/themes/thub/images/avi.jpg)