misunderstanding OnControllerColliderHit ?

hi,

i am having trouble working out when (or how) exactly the OnControllerColliderHit function gets called.

when i attach the following to the standard first person controller prefab, it returns a ‘hit’ only the first time the controller collides with an individual collider.

ie: if the controller collides with a mesh it has not collided with before, its name will be printed as i expect, but this particular collider will never again trigger the OnControllerColliderHit function ?

any tips for what i am missing would be greatly appreciated.

thanks
andrew

function OnControllerColliderHit (hit : ControllerColliderHit)
{
var body = hit.collider.gameObject.name;
print(body);
}

Make sure Collapse in the console isn’t selected; otherwise all messages that are the same will be, well, collapsed. :slight_smile:

–Eric

thanks… that did the trick… :sweat_smile:

Don’t worry, that happens to lots of people…it happened to me…probably should be in a FAQ. :wink:

–Eric