x


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?

more ▼

asked Jan 03 '11 at 12:46 AM

Qertyum gravatar image

Qertyum
3 2 2 6

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

You change it to OnTriggerEnter. It's a trigger now.

more ▼

answered Jan 03 '11 at 12:58 AM

Jessy gravatar image

Jessy
15.6k 72 95 196

thank you very much it worked :)

Jan 03 '11 at 01:28 AM Qertyum
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2483
x716
x379

asked: Jan 03 '11 at 12:46 AM

Seen: 1278 times

Last Updated: Jan 03 '11 at 12:46 AM