OnTrigger not being called

I don’t know where I am going wrong, but am inexperienced with using the Animator. I do not understand why my trigger of “InRange” is not working, when the code I am using is based on working code in the Survival Shooter Tutorial and the appropriate API.

void OnCollisionEnter(Collision col)
    {
        if (col.gameObject.CompareTag("Player"))
        {
            animator.SetTrigger("InRange");
        }
    }

My Player has the tag of Player, the following object has the trigger collider. When the following asset enters the collider, it carries on doing its original animation.

Any help on where I’m going wrong would be appreciated.

Thinking about how it might work. Would setting the trigger to true OnCollisionEnter and false OnCollisionExit?

I still cannot get this to work.

Hi,

can you show all the settings of state transition? Now they are collapsed in your screen capture.

Did you test this without tag checking first?