I’m just trying to build a simple trigger detection script but the basic trigger system is not working. Not even the debug messages in the script show up in the console. I’ve tried with a box collider trigger and a sphere collider trigger (making sure “Is Trigger” is checked of course). The entering objects always have a rigidbody component. So what is the obscure “X-factor” not covered in documentation and tutorials that’s got me stymied?
using UnityEngine;
using System.Collections;
public class TriggerScript : MonoBehaviour {
void onTriggerEnter(Collider other)
{
Debug.Log("Object entered trigger");
}
void onTriggerExit(Collider other)
{
Debug.Log("Object exited trigger");
}
}