If character stay on a ground

Hi! Someone now the script “IF” when the character stay on a portion of ground, an action going.

For example, I need this for 2 stuff:

  1. When i stay near a tree, a bird will fly from the tree (with animation).
  2. When i enter in a portal, level2 unlocked.

Please help, i try what i can, i’m new on Unity but i want to evolve.

Thanks,
Glad, BogdanV.

Don’t do this by trying to define some places on the ground, simply put a GameObject with a Collider there, set the Collider to isTrigger and react to the OnTriggerEnter event. You might need to add a rigidbody to the player Object to have these Events fired.