- Home /
Question by
carter-carl30 · Feb 18, 2014 at 07:38 PM ·
ignorecollisondetonator
Detonator-Chunks ignore collision with my goal
I have my script:
var Prefabspecial_button_holder : GameObject; //object to spawn item at
var Prefabspecial_button : GameObject; //powerup spawned
var firestorm_powerup : GameObject; //powerup pod
var level_complete : GameObject; //level complete text
function OnTriggerEnter (other : Collider) {
if (other.gameObject.tag == "Player")
{
var Prefabspecial_button : GameObject = Instantiate(Prefabspecial_button, GameObject.Find("special_button_holder").transform.position, Quaternion.identity);
Prefabspecial_button.transform.parent = Prefabspecial_button_holder.transform;
}
level_complete.renderer.enabled = true;
yield WaitForSeconds (3);
Application.LoadLevel(Application.loadedLevel + 1);
}
it detects when the player falls into it and level is completed, the problem I am having is that I have on one level objects that explode (using Detonator-Chunks) what is happening is that sometimes the chunk object is hitting the finish and completing the level before the player has even got near.
How do I prevent this?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613133943im_/https://answers.unity.com/themes/thub/images/avi.jpg)