void OnTriggerEnter(Collider other) { if (other.CompareTag(Tags.Player) && isFalling) { // Cache the player's character controller PlayerDeath playerDeath = other.GetComponent <PlayerDeath>(); // Perform death playerDeath.DieByImpact(); } isFalling = false; isCollided = true; }