- Home /
Not a simple 'answerable' question. Moving to forums.
How to tell if something HITS a charactercontroller?
So it seems character controllers will ONLY do collision detection if they are moving, and they will only detect in the direction they are moving.

You can see it works fine when I run into the object, but when the controller is idle, it does no collisions at all. As shown, I would like it to collide+be pushed by objects when not running directly at them.
How can I make it always check for collisions? Thanks!
Answer by Owen-Reynolds · Jan 21, 2015 at 05:56 PM
Yes, this is a known thing ... lots of older discussions (why it works this way, ways to fix) if you search "unity charcontroller collision" and things of that nature.
The basic issue is that charControllers are not rigidbodies, so the system does not push them around. The way they slide off of things when they move is actually specially added to their own move command. Interaction with moving objects is usually hand-done (moving platforms, grab a swinging rope... .)
Can switch to a rigidbody on the player. Lots of work. Do this only if many things will be knocking the player around in "realistic" ways.
Depending on the problem, using OnCollisionEnter/Stay on the player and on the objects hitting the player can help. Since the player's fake capsule collider does count as a collider. Try it and see when they fire. Then you have to math-out the proper way to shove-move the player.
The objects are a bit complex (Think of walking on a vertical rotating gear), not something that can be easily manually coded.
I can't seem to find any other topics regarding this, only simple generic collisions ones, so I'll remake this in the forums as it seems to be more of a discussion topic than a simple answer.
Follow this Question
Related Questions
Is there a way to properly detect collisions on Character Controller? 2 Answers
Collisions issues of CharaterController with other box colliders 1 Answer
How to make a Character controller destroy an object? 3 Answers
Collisions with CharacterController? 0 Answers
Detect when CharacterController is not colliding? (SOLVED) 1 Answer