Hello everyone.
Im working on a 2d game where the characters are moving on a sloppy plane, i needed the charactercontroller so the character detect the ground plane and not fall through it but im facing a problem where the characters are also colliding with eachother, i want the character controller to skip the characters collisions so the characters can move through each other is that possible with the charactercontroller.move?
Thanks in advance
Two separate problems.
- Stopping the characters colliding. There are two ways to do this. If you have a limited number of characters you can simply use Physics.IgnoreCollision : IgnoreCollision (collider1 : Collider, collider2 : Collider, ignore : boolean = true) and set each pair of character colliders to ignore each other. If you have a large or dynamic number of characters, you will be better off using layers. See this documentation. Basically you will create a character layer and make it collide with everything except itself.
2)There are a number of ways to avoid terrain clipping but the prettiest is using inverse kinematics. It sounds complicated but there is a wonderful package for free on the unity website that is easy to install.