What is the event that triggers when 2 Character Controllers collide?
Also, will this event by triggered for both character controllers?
Thanks,
What is the event that triggers when 2 Character Controllers collide?
Also, will this event by triggered for both character controllers?
Thanks,
OnControllerColliderHit() is fired on an object that has a CharacterController attached when it hits something. So if two CC’s collided, the would both fire it.
I actually tested this, and it doesn’t work for some reason. I added a character controller to a grenade prefab. I did this, so the Move() event takes into account any collision when the grenade drops on the ground. The problem is that while the physics works (the grenade moves around the enemy) the event isn’t triggered for Character Controller (enemies), but it gets triggered for colliers (IE walls, ground)
Ahh I think I get it; sorry I don’t use CC’s much. It only fires on the CC when the CC is currently in the midst of a Move command, I think, so you might have to do everything from the grenade’s perspective. What do you want to happen when the grenade hits the enemy?
I need it to explode, nothing fancy. My only issue is that the OnControllerColliderHit() event doesn’t get triggered when a character controller hits another character controller.