- Home /
Character controller and colliders neither set off 'OnCollision' nor ' 'OnTrigger'; are ridigbodies mandatory?
My npcs use character controllers and colliders, and I want to detect if the npc bumps into any of my static objects that also have colliders.
OnCollisionEnter and OnTriggerEnter don't fire if neither of these have a rigidbody attached. Is a rigidbody absolutely necessary for this?
On a side note, the unity documentation says "You use Character Controllers if you want to make a humanoid character. This could be the main character in a third person platformer, FPS shooter or any enemy characters."
So...how am I supposed to properly handle collisions if OnCollisionEnter and OnTriggerEnter also expect a rigidbody to be attached?
Answer by Eric5h5 · Apr 12, 2010 at 12:30 AM
Use OnControllerColliderHit for character controllers.
Thank you, I feel silly now for forgetting about that.
Your answer
Follow this Question
Related Questions
How do you get an event to call when too Character Controllers hit. 1 Answer
character collider colliding with another character collider 1 Answer
OnControllerColliderHit -> GetComponent on collided object not working 1 Answer
Detecting collisions with OnControllerColliderHit when not moving 0 Answers
OnControllerColliderHit won't trigger if not moving 2 Answers