I feel like I ought to know this by now, but I never had a need to deal with it, and I'm not finding anything about it while searching. I just want to use OnCollisionEnter, and have it react to a CharacterController. Is that not possible? All I've got moving in my scene is a Character Controller, so it's a waste to have to check junk in OnControllerColliderHit.
Answer by Mike 3
Jul 15, 2010 at 06:51 PM
It's not possible without adding a rigidbody onto your character controller, no. And then that's probably an even bigger waste
Don't like it. Thanks.
why is adding a rigidbody a waste? How else can one detect collisions in the characters "view"? I added a box collider and a rigidbody to make it possible for the character to interact with the surounding objects that are near.
You actually don't need a rigidbody when you are using a CharacterController. Check this post. It's said in which conditions OnCollisionX, OnTriggerX and OnControllerColliderHit are called.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
1 Person is following this question.
Compound collider does not trigger the parent
GameObjects glitching through other Objects when being held
Getting Character controller to fit model?
Which Object Calls OnCollisionEnter()?