Okay, here’s my problem. I have two gameobjects with the tag “selectable”.
I need to check if they are colliding. Here’s part of my script:
void OnCollisionEnter(Collision other){
if(other.gameobject.tag.Equals("Selectable")){
CollidingWithSelectable = true;
}
}
void OnCollisionExit(Collision other){
if(other.gameobject.tag.Equals("Selectable")){
CollidingWithSelectable = false;
}
}
The thing is, OnCollisionExit isn’t called when one of the objects is destroyed.
Is there any way to check collisions WITHOUT OnCollisionExit or OnCollisionEnter?
I have tried CastSphere, but (as far as I know), there is no way to check what object it is colliding with.
Please help!