- Home /
Collisions with CharacterController?
Hi guys, All I want to do is to is to make the player "take" an object, I've the character contoller and the object that's a rigidbody and call this function:
function OnControllerColliderHit(obj : Collision){
if(obj.gameObject.tag == "Player" && gameObject.tag == "key"){
//ottieni key
Destroy(gameObject);
}
}
what've noticed is that the collision works really bad, calling this or OnCollisionEnter only If I really try hard to hit the object. What you guys suggest to do?
how do you mean by really try hard to hit the object? Try resizing your character controller collider, make it a bit bigger.
the collider is big as the player, with hard to hit I mean that when I hit it in the game, it doesn't really call the OnCollsiionEnter function, I've to try to hid the object more times to make it occurs
Your answer

Follow this Question
Related Questions
How to tell if something HITS a charactercontroller? 1 Answer
Collisions issues of CharaterController with other box colliders 1 Answer
Is there a way to properly detect collisions on Character Controller? 2 Answers
How to make a Character controller destroy an object? 3 Answers
Detect when CharacterController is not colliding? (SOLVED) 1 Answer