So with no luck I been trying to cause a projectile that hits enemies only once before ignoring it. Of course since this projectile sticks around for a moment, it can’t just ignore the collisions of all enemy characters, or disable it’s own collision due to this.
I just want collisions to disable specifically for that single enemy, which must happen after the projectile collides with it.
I really thought this would work, however while everything in the code works, it never does the IgnoreCollisions for the next time the enemy collides with this projectile.
function OnCollisionEnter(enemy : Collision) {
Physics.IgnoreCollision(enemy.collider, collider);
//Do stuff to the enemy here.
}
Any help would be appreciated, I can’t figure out why this wouldn’t work if in Start and Update functions IgnoreCollision generally works fine.