Hi there,
I have a problem with the OnTriggerEnter function. Let’s say I have a box collider with this basic script attached as a test :
function OnTriggerEnter(col:Collider) {
Debug.Log("in");
}
function OnTriggerExit(col:Collider) {
Debug.Log("out");
}
The problem is, when I’m testing the game, with my First Person Controller outside of the trigger, I’m getting the “in” message. If I walk in, then walk out (and so on) : it works, the message changes. But I don’t understand why by default when I’m starting the game and I’m not in the trigger, why is the trigger active, why doesn’t I have the out message ?
Thanks