I am using the first person controller. I want it so if the character touches a cube it will go to a different scene. Is there any code?
You can use OnTriggerEnter:
function OnTriggerEnter(x:Collider){
if (x.name == "Player"){
Application.LoadLevel("(fase name)");
}
}
Don’t forget to rename the player to “Player”, and to check the Is Target checkbox in the cube collider.
Is
(“(fase name)”)
where i put the scene number?
I mean like replace fase name.