- Home /
Teleporter
I need a script so when my character walks through a door or cave, they will teleporter to a different scene. So I basically need it so as soon as my character touches the thing that I'm using as a portal, the character will transport to a different scene.
Answer by Olgo · Nov 24, 2012 at 12:23 AM
Add a collider to the game object you want to enter, check the IsTrigger box. Add the following script to the game object:
function OnTriggerEnter (other : Collider) {
Application.LoadLevel("NameOfYourScene");
}
Answer by greatestprez · Nov 23, 2012 at 10:27 PM
Have you even tried to make it yourself?
I think i can get how to teleport.. $$anonymous$$y main problem I think is the part on how when you touch it, it activates...
Dude I may seem dumb at this, which I am, but can you just help me here I just wanna get on with building my game... I will try my best on the code, but how do I use a trigger collider?
$$anonymous$$ake a box, make it a trigger volume in the inspector, attach a script when something enters load scene.
Your answer
Follow this Question
Related Questions
Skip to the previous screen without reboot ?? 0 Answers
List of Arrays? 1 Answer
Error in script 1 Answer
Same Script in a different Scene with different conditions 1 Answer