- Home /
OnTriggerEnter notworking plz help!
This is what i got. Its for a key that goes into a collider then plays a animation.
using UnityEngine; using System.Collections; public class Keyandlock : MonoBehaviour {
void OnTriggErenter(Collider other)
{
if (other.gameObject.tag == "Key")
{
Debug.Log("Detected");
}
}
}
Comment
Best Answer
Answer by OneCept-Games · Jan 02, 2018 at 07:45 PM
Spelling mistake.
void OnTriggerEnter(Collider other)
{
if (other.gameObject.tag == "Key")
{
Debug.Log("Detected");
}
}
Your answer