- Home /
I Have Another Question?
Ok so i added a flag and named it Exit_Flag. I added a box collider to it but for some reason my character runs right through it instead of hitting it. I also added the script here:
function OnControllerColliderHit(hit : ControllerColliderHit) { if (hit.collider.name == "Exit_Flag") { Application.LoadLevel(Application.loadedLevel + 1); } }
to my characeter and checked to box for my Exit_Flag's box collider that says Is Trigger and it doesnt go to the next level when i run into the flag. Is the problem because my character can't hit the flag and just runs through it. Im in 2d so in the scene view my character is on 0 on the z axis and my flag is as well. I dont understand what im doing wrong.
Your answer
Follow this Question
Related Questions
Problem with "sticking" to a block. 0 Answers
Unity 5 - ExitApplication(); causes Crash 1 Answer
How to Exit Application in Android on Back Button 3 Answers
How to end a game with ESC button. 1 Answer
Exit on Collision 2 Answers