Home Game Development unity – I’ve set my animation to play when the participant enters a set space a by script nevertheless it’s not enjoying

unity – I’ve set my animation to play when the participant enters a set space a by script nevertheless it’s not enjoying

0
unity – I’ve set my animation to play when the participant enters a set space a by script nevertheless it’s not enjoying

[ad_1]

I’ve set my animation to play by a script I made nevertheless it’s not enjoying. I’ve all of the references appropriate my spelling is appropriate as nicely.
My code:

utilizing System.Collections;
utilizing System.Collections.Generic;
utilizing UnityEngine;

public class AnimationTrigger : MonoBehaviour
{
    [SerializeField] personal Animator myDoor;
    [SerializeField] personal string DoorOpen = "DoorOpen";

    personal void OnTriggerEnter(Collider different)
    {
        if(different.CompareTag("Participant"))
        {
            myDoor.Play(DoorOpen, 0, 0.0f);
            Debug.Log("Animation Performed");
        }
    }
    
}


Image of my animator window:

enter image description here

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here