#pragma strict
function Start () {
}
function OnTriggerEnter () {
Application.LoadLevel("level-1");
}
So I have applied a collider and the script to the door sprite but it doesn’t work and my character walks through it.
My character has a box collider for the head and body and a circle collider for the feet. I also have the level in my build settings.
Did you try adding the collider parameter to your OnTriggerEnter?
function OnTriggerEnter (other : Collider) { }
Have you put a Debug.Log call in the event handler to verify its being called. My guess is that the prototype doesn’t match and isn’t being called, thus your Application.LoadLevel isn’t being executed.