- Home /
Why is my character Controller NOT colliding with collisiders?
Recently, My avatar (which uses a character controller) stopped colliding with objects in my scene, and I don't understand why. I'm not exactly sure when it happened, because I noticed this while I was testing a script on a different object when the avatar passed through it. I've tried removing the new script, that fixed nothing. I've tried undoing everything else I did since last time I'm sure it worked, but its still broken. I've tested it against new colliders, so it wasn't the object itself, its the avatar. I even added a capsule collider but it still clips through everything.
Here's the avatar's inspector during gameplay;
I also noticed that it I land vertically onto an object the avatar will stand on it and not pass through, but if I hit the same object horizontally it ignores it.
This is a completely game breaking bug, what could be causing it?
Yes, I tried adding a capsule collider. I should've said that in the question, I'll add that.
Character controller has a collider in it already. Use the functions I linked to register hits with a character controller.
Those can be used to register a collision in a script, that's not what I'm trying to do. $$anonymous$$y problem is that the avatar is walking through walls and doors and other assets, ignoring the colliders on them.
The only object it isn't passing right through is terrain, but like I said for some reason it can stand on colliders but not bump into them so that's probably the only reason for that.
Answer by xdarned · Oct 20, 2020 at 03:03 PM
SOLVED!! Lisen, I have the same problem, Character Controller not detecting other Colliders. The problem was the #@%! LAYERS of the colliders.
Go to Edit->Project Settings->Physics. And check if the layers you are using can detect each other from the matrix.
I added two new layers, wallLayer and playerLayer and got sure that these detects each other in the physics matrix.
That's right!!!
I checked Default to Player and Default to Default. Then it worked! I think it changed after i Imported Unity's 3d Game Kit!
Thanks a lot.
Answer by gyagyagyerek · Jan 31, 2014 at 03:31 PM
I have the same problem as you. Suddenly (i don't know how and when) my Player does not colliding with other collisiders except the object right under it (it can be anything). Others like a wall or crates, etc. just don't. I don't want to check or trigger an event. I just want that the wall stops the player. It worked before! Colliders without trigger, with or without rigid body.
A few months ago i had the same problem already but somehow i solved themself. ..and now here it is again.
Are you solved the problem? Or have a workaround?
Answer by SkyFire56 · Feb 15, 2017 at 09:43 AM
Remove your box collider and add a rigidbody with a new box collider. That working
Answer by 7takeo · Feb 15, 2017 at 11:52 AM
For a collision to take effect one of the two objects MUST have Rigidbody component.
Hope this help you mate.
Answer by AmoVires · Feb 15, 2017 at 11:52 AM
Are the objects on the same Z coord? Are they both having the same type of collider? Does the player have a rigidbody? Is layer Player 's collision enabled for the other layers?
Your answer
Follow this Question
Related Questions
RaycastHit collider not showing correct tags 1 Answer
Character controller gets stuck on stairs unity 4 scene import to unity 5 0 Answers
character controllers without collider climbing each other 0 Answers
2D collider problems 1 Answer
How to keep playing from falling off edge with placeable tiles 0 Answers