I want to ignore collisions between an object and a special class of objects only when the collision contact point meets a few criteria. In other words:
function OnCollisionEnter(other : Collision) {
if (isSpecial(other.gameObject) && meetsCriteria(other.contacts[0].point)) {
// Ignore this individual collision
}
}
However, I don't want to use `Physics.IgnoreCollision(other.collider, collider)` because I want future collisions to still happen.
Any thoughts? I will probably have to default to some kind of hackery where I remember what colliders I've ignored and then reenable collisions later, but I'd like to have a cleaner and less hacky solution.
Thanks!
↧