How do I create a trigger? Seems simple enough, but I can't get it to work. I tried this:
- Create GameObject --> Cube
- Tick "Is Trigger" in the Box Collider section of the Cube
- Create a script triggerTest and attach it to the cube (script below)
- Put a First Person Controller from the Standard Assets in the scene
I can walk through the box, but the trigger is never activated. I have also tried adding a rigid body to the First Person Controller. This is the code I have in triggerTest.cs:
using UnityEngine;
using System.Collections;
public class triggerTest : MonoBehaviour {
void onTriggerEnter(Collider other) {
Debug.Log("Trigger triggered");
}
}
What am I missing here?