- Home /
Character collider falls away unless "isTrigger" selected
I have a character with a character controller on it, which is good for moving the character around. However, I also want to have a larger radius around the character to use for detecting when I collide with objects well before they are actually reached by the character. Kind of an "early warning system."
I added a capsule collider to the character's hierarchy, and this is where things get odd. If the capsule collider is left as a collider, then it rolls away from the player when the game starts. If I select isTrigger, then the collider stays with the character, and I can use it to detect collisions (by using OnTriggerEnter instead of OnCollisionEnter).
So I can get away with the iTrigger, but I'd like to know why I can't leave it as a collider.
Answer by Maddogc · Jul 12, 2012 at 05:42 PM
I think the problem you have is that your character collider is colliding with the added capsule collider. You could try to set different layers for each collider (object) and discard them against on the collision matrix - have a look here for layer based collisions. (Edit->Project-Settings ->Physics)
Now, parent them individually to a new game object and the bigger ranged object should work as pre warning system with it's collision check functions...
Your answer
Follow this Question
Related Questions
Keep doing something while colliding 1 Answer
Destroying an object on collide depending on the impulse magnitude. 0 Answers
Colliding two GameObjects 1 Answer
Inconsistent behaviour in child triggers 1 Answer
Colliders that do not collide... 1 Answer