I am using the Physics.IgnoreCollision to selectively choose whether or not two objects collide. Now the issue I am running into is that the first moment the two objects interface they interact and then after that they don’t. It seems to be speed dependent because it isn’t noticable if they collide slowly but the faster they collide the great the effect is. I guess my question is how can I fix this?
This is the code I am using:
function OnCollisionEnter (other : Collision)
{
if(other.gameObject.tag == "WNonColl")
{
Physics.IgnoreCollision(other.collider, collider);
}
}
function OnCollisionStay (other : Collision)
{
if(other.gameObject.tag == "WNonColl")
{
Physics.IgnoreCollision(other.collider, collider);
}
}
This is just basically checking to see if the tag of the object it is colliding with is “WNonColl.” If it is, it ignores the collision otherwise standard physics apply.
I have a test web player scene attached that will hopefully show you what I mean about this momentary interation. Any thoughts would be greatly appriciated. Thanks in advance!
57656–2093–$ignore_collisions_585.zip (27.6 KB)