Hello
I am trying to make a projectile, which destroys itself upon impact. The problem is ,i need it to ignore some objects ,such as the character controllers collider, and i am flummoxed why it wont work.
My solution is:
function OnCollisionEnter ( hit : Collision){
if (hit.gameObject.tag !== "MainCamera" || hit.gameObject.tag !== "DontDestroyProjectiles" ) {
Destroy (gameObject);
}
}
Also i have been fiddling with Physics.IgnoreCollision ,without results. Maybe it would work with that, and if someone found a way with this ,please explain it troughly, becouse im pretty dense.
Any help would be greatly appriciated.
Thanks!