Check out example codes for "unity while in trigger". It will help you in understanding the concepts better.

Code Example 1

void OnTriggerStay(Collider other)
 {
   Debug.Log("This will be called every frame");
   if (Input.GetKeyDown("space") && other.tag == "TalkCylinder")          
   {
     Debug.Log("Talking");          
   }      
 }

Learn ReactJs, React Native from akashmittal.com