How can I detect if a gameObject has collided with two other specific objects AT THE SAME TIME?
This is what I intend to do but it does not work:
void OnCollisionEnter (Collision col)
{
if(col.gameObject.name == "object1" && "object2")
{
Destroy(gameObject);
}
}
How can I correct this piece of code?