OnControllerColliderHit not working from the top!

Howdy Unityers, small problem with OnControllerColliderHit. I have this script attached to a character controller…

function OnControllerColliderHit (hit : ControllerColliderHit)
{
	Debug.Log("HIT! "+ Time.time);
}

And it works just fine when the controller is touching from the bottom or the sides…but doesn’t register when the top of the capsule is colliding with the other object. I can’t seem to find any reason whatsoever for this looking through the documentation. My character only moves using the
Move function, and I can’t imagine why it wouldn’t be working…sorry if this is a little vague, but I’m hoping this is a common issue.

Thanks for any help!

Maybe try OnCollisionEnter or Stay?

I was under the impression that OnCollisionEnter/Stay were only called on collisions between rigidbody/colliders, and this collision is between CharacterController collider and regular collider…also, this should work! Completely baffled by it, the collision flags register the top of the capsule colliding with the “ceiling,” but OnControllerColliderHit doesnt…this must be a bug or something.

I’ve got exactly the same problem on a 2D platform game…

Did you succeed or found a solution ?

The unity character controller seems to behave just like the one provided with PhysX does. That one also does not report top collisions in the collision callback function. A workaround is to read out the variable that says it registered a top collision. Or if you need the collider you collided with on the top, you can also use a ray cast to find out what it is.

Maybe you should also file a bug report because this is really an annoying default behaviour and I guess many people stumble over it.