- Home /
How can I make two Character Controllers Collide
Hi, I have been stuck with a problem for a while now where my two enemy game objects which I have given a CC each are not colliding and I have copied the OnControllerColliderHit function word for word and though they collide with other things they won't collide with each other still.
If anybody knows the solution please tell me as it will be much appreciated.
Many Thanks,
Tommy Eaves
They will collide by default.
http://docs.unity3d.com/ScriptReference/CharacterController-detectCollisions.html
You may need to incorporate a rigidbody somewhere.
Answer by Inok · Jun 29, 2015 at 05:17 AM
Try "RigidBodyFPSController" from "Characters" package of Standart Assets in Unity 5.1. It 100% must register collision because based on rigidbody component.
Answer by GiyomuGames · Jun 29, 2015 at 05:37 AM
First of all make sure they have rigidbodies, then go into you the Physics settings of your project and make sure that the layer in which the enemies are is set to collide with itself: http://docs.unity3d.com/Manual/LayerBasedCollision.html