- Home /
Problem with the collider(I think)
Hi, Im having a big problem with the collision. In my game Im making an object that duplicates a prefab with collider and then when it duplicates I make that another object that has collider when they get closer(using collider) it destroys the duplicated object. But the problem its that it seems to work at the duplicate an object but the real problem is when it gets to the other object. I need answers of what could be the problem.
Note: Im using trigger and rigidbody so thats not the problem.
Thanks, in advance :P
Could you rephrase your problem? $$anonymous$$aybe a small code sample would help to understand which part of your algorithm is failing. Also - be detailed about when using colliders and when using triggers.
I dont think that the code is rong but ok. In the first object that has collider(trigger)and rigidbody: function OnTriggerEnter(other : Collider){ other = Instantiate(newobject,transform.position,other.rotation); }
And in the other object(not the new one) that has rigidbody and collider(trigger) its: function OnTriggerEnter(other : Collider){ Destroy(other.gameObject); } It supposed to create a new object and then another object destroys the new object
Your answer
Follow this Question
Related Questions
Collission and Trigger on Same object 0 Answers
Trigger if 3 Objects Collide at the same time 0 Answers
overlapsphere to destroy NPCs on exit 1 Answer
OnTriggerEnter Not Working 3 Answers
Collision detection accuracy issues. 1 Answer