In this game here I want it that the bullet can receive a collision event when it touches the player then inflict damage and destroy itself.
The bullet has a trigger collider, a kinematic rigidbody and a script that makes it go forward and handle the collision event with OnTriggerEnter()
. The player has a CharacterController component and a script that supports movement with Move()
method.
I noticed some strange behaviour in play mode: everything works as expected in the beginning, but after the player makes any movement, OnTriggerEnter()
method is no longer being called upon collision with the player. I also tried handling the collision on the player side with OnControllerCollisionEnter()
but that doesn’t work. Is there anyway to handle the collision event between trigger and character controller properly?