I am working on 3D fighting game.I have two character with their animation.I have applied character controller and character controller script which i have customized. I have tw
Alright. I assume that you get neither the OnCollisionEnter nor the OnTriggerEnter call.
Ensure, that the scripts with these methods are on the actual GameObject, that has the collider-component.
OnCollisionEnter-Reference:
"Note that collision events are only sent if one of the colliders also has a non-kinematic rigidbody attached."
To sum up: OnCollisionEnter is only called if you actually use the physics system for moving the objects around due to forces, collisions etc.
If you want to just register a hit without it causing movement via the physics-system, you can use the OnTriggerEnter. In this case, the rigidbody must be on the moving object, and at least one of the involved colliders must be set to isTrigger.
Also ensure that the layers are set to collide in projectSettings->Physics.
Hope this helps you.