- Home /
how do you change a scene ingame?
I have tried in different ways but none of them work for me. i use this code but i dont know what i am doing wrong:
Function OnCollisionEnter(collision : Collision)
{
if (collision.gameObject.tag == "Player") {
Application.LoadLevel ("level2");
}
}
The player has a rigidbody, the Tag is OK.
Also i want to do it through a collision object
I joint the script to it, and where it says Capsule Collider i activated the 'is trigger' but then i cannot touch it, what should i do?
Comment
Best Answer
Answer by Jessy · Jan 03, 2011 at 12:58 AM
You change it to OnTriggerEnter. It's a trigger now.
Your answer
![](https://koobas.hobune.stream/wayback/20220613093746im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Scene Change Collision 2 Answers
How do I make a scene change when my Player collides with a item? 1 Answer
Scene change on collision script? 1 Answer
carrying player data from one scene to the next 1 Answer
change scene with keypress?? 1 Answer