- Home /
Question by
Chris12345 · Jun 26, 2012 at 10:03 PM ·
physics
How can i disable collision after collision?
How can i disable collision after collision? i have 2 objects with 2 box colliders and i need them to collide and then have them disable collision with each other but not with other objects?
Comment
Best Answer
Answer by Statement · Jun 26, 2012 at 10:34 PM
not working?
#pragma strict
function OnCollisionEnter(collision : Collision) {
Physics.IgnoreCollision(gameObject.FindWithTag("Whatever").transform.collider , this.collider);
}
Bad idea to use FindWithTag.
#pragma strict
function OnCollisionEnter(collision : Collision) {
Physics.IgnoreCollision(collision.collider , this.collider);
}
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
What is the Root when making a ragdoll 1 Answer
Unity Physics vs. real physics 1 Answer
How to 'flick' objects in a 2d game 1 Answer
Error in scripting with Physics.Raycast 0 Answers