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 post good questions and use the site effectively we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
1 Person is following this question.
Getting a collision's bottom-most collider in a hierarchy
Can static objects detect collisions
Why OnCollisionEnter cannot detect collisions between colliders?
Character Collider doesn't collide with other Colliders