- Home /
Get Character Controllers to ignore other Character Controllers
Hi. I have two GameObjects (gumbas!) that are being controlled by Character Controllers. I am trying to get the gumbas to completely ignore each other. There are a couple of colliders that are already being ignored using Physics.IgnoreCollision() and that works great. However I cannot seem to get the two gumbas Character Controllers to ignore hitting each other. Is there some way to access the controllers colliders? Or do I need to find a new way to move my little enemies.
Answer by instruct9r · Dec 28, 2013 at 06:15 PM
Assign them to a new Layer. Then go to Edit > Project Settings > Physics, and turn off the checkBox, where the names of that layer cross. This way they will ignore each other...
Beautiful that worked perfectly. Anyway to do that in code?
You might want to check these out and play with them little bit. Haven't tested them, but one of them shoud do, what you need:
Yep the first one does exactly what you suggested to do in the editor in the script. Thanks a bunch.