I am developing a ship war game, there are NPC and Main Character, they’re all ships.
So I would like to attach Character Controller to all of them.
Now about the collisions, we designed as the following list:
- Main Character: Character Controller
- Enemy Ships: Character Controller, Sphere Collider(Big sphere Trigger)
- Projectile: Sphere Collider + Rigidbody(isKinematic=false gravity = true)
- Sea Map: Mesh collider. For sea shore / islands and map edges.
- Assets: Box collider + Rigidbody(isKinematic=true). The main character will collect them.
I hope the ships can bounce each other, and collide with the map edges.
What’s the best solution? Seems that I can try this:
- Main Character: Character Controller + function OnControllerColliderHit()
- Enemy Ships: Attached Rigidbody
However, the enemy ships doesn’t work well whether isKinematic is true or false. The enemy ships have to detect collisions and triggers in too many situations.
blabalabla…
Well, I think what I exactly need is “How To Detect Collisions Between Two Character Controllers?” (One of them has already use Trigger for other purpose)
Or is there any better solutions?