Hi i try to play an animation trigger ( it’s just a door that moving up ) but when i press play i have no error information in my console and in my game the collider doesn’t work my FPSController goes through the door !
this is the script i used
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DoorOpen : MonoBehaviour {
Animation Animation;
void Start()
{
Animation = GetComponent<Animation>();
}
void OnTriggerEnter(Collider other)
{
if (GetComponent<Collider>().name == "FPSController")
{
Animation.Play("OpenDoor");
}
}
}