Quantcast
Channel: Answers for "Reload Level on Collision"
Viewing all articles
Browse latest Browse all 8

Answer by Statement

$
0
0

If you're dealing with a character controller, then you should use OnControllerColliderHit.

var myLevel : String;

function OnControllerColliderHit (hit : ControllerColliderHit)
{
    if (hit.gameObject.name == "Runner")
    {
        Application.LoadLevel(myLevel);
    }
}

Viewing all articles
Browse latest Browse all 8

Trending Articles