I've got a projectile that uses a charactercontroller, and an npc that uses one also.
For some reason, the OnControllerColliderHit registers when the projectile hits the terrain, but not the npc. I know the projectile is hitting the npc, because the projectiles visibly bump the npc.
This post discusses characters controllers and rigidbodies: http://answers.unity3d.com/questions/149/guidelines-for-using-rigidbody-collider-charactercontrollerscript-etc
But I'm still not "getting it", I'm afraid. A different post states that npcs should generally be used with CharacterControllers, but I seem to recall a different post stating that CharacterControllers don't work well together regarding collisions. So...I'm confused on what to use when. I understand triggers only work with rigidbodies. Should I have game objects with CharacterControllers AND rigidbodies? I guess I'm still confused about what type of controller/setup to use with various types of objects, and the caveats that go along with that regarding collision. For all I know, my projectiles should be rigidbodies, my npcs should be character controllers...in same cases. Anyone clear this up a little for me?
asked Apr 04 '10 at 09:24 PM
You can always add another collider to the npcs, which the character controller will register collisions with in OnControllerColliderHit.
answered Apr 05 '10 at 04:46 AM
This is my personal opinion, but if you want to detect collision between multiple CharacterControllers, then personally I would say to ditch them and use this instead:
Despite the name(FPS), its great a base for any kind of character, and provides fluid movement with rigidbodies. But no there isn't any easy way to detect collision between CharacterControllers, which is why I tend to avoid them. Hope this helps you.
answered Apr 05 '10 at 03:43 AM