Hi everyone (again),
I was wondering how I can make this work:
While “flying” over an bezier with the flythrough script (like this one: http://forum.unity3d.com/viewtopic.php?p=207590) the camera hits a trigger box (a simple cube) with the following code added:
function OnTriggerEnter(whatHitMe:Collider){ //detects it has been touched
Application.LoadLevel ("levelIwanttoload"); // loads up the level
}
but instead of switching to the scene I want, the camera just keeps on flying over the bezier curve. My first guess is to change the “whatHitMe” in the code, but to what? ![]()
PS. This trigger + code DOES work with the First Person Controller prefab. Oh and the “Is Trigger” option is switched on ![]()
Thanks! 8)