- Home /
How do I detect a collision between two colliders?
My character uses Unity's Character Controller. The ground uses a Mesh Collider. If I set the ground to be a trigger, the character will fall through the floor. How do I detect when the player hits the ground?
EDIT: I'm currently working around this by raycasting and using a sentinel bool. Seems like such a cludgy fix though :[
Answer by kkpgarcia · Feb 06, 2014 at 03:13 AM
Trigger only causes the game objects pass by each other so that they would "Trigger" an effect and not collide. You have to un-check the trigger.
Hope this helps!
No. I know that about trigger. The problem is that when I un-check trigger, I don't get OnCollisionEntered because I am using two colliders. I need some kind of way to detect when my player hits the ground. CharacterController's IsGrounded check is currently broken and does not work reliably. I can't make my character OR the ground into a non-kinematic rigidbody, for obvious reasons, and so I can't use OnCollisionEntered for my character hitting the ground