OnTriggerEnter not firing in first frame?

I have some code for a trigger that is generally working fine. When a character enters the trigger, everything fires appropriately. This trigger is used as a terrain modifier in a strategy game, i.e. lava which applies fire damage to the player. I can detect all three distinct enter / stay / exit events.

However, if I place the character on top of the lava in the scene editor and then hit play, then the trigger will not fire. If I run him off of the lava and then back on, the trigger will fire. I have also tried duplicating the character in the editor while the game is running and again the trigger will not fire unless the player exits and then enters the trigger.

Does anyone know how I might make the trigger fire right away, even if a character is spawned on top of it?

Well here is a hack answer.

In the Start() function for my character, I move his position by .01f. I create a bool called FirstFrame and initialize it to true.

In the Character’s FixedUpdate, if FirstFrame = true, then I move his position back by .01f. This fires the trigger.

I suppose OnTriggerEnter checks a delta between frame n-1 and frame n. So it is not working for the first frame. In your case, I think you should check with OnTriggerStay on the first frame, and valuate a boolean to stop checking it on other frames :

var frame1Checked:boolean = false;

function OnTriggerStay (other : Collider) {
    if (!frame1Checked)
        ... // here you put your lava fire code
        frame1Checked = true;