Beispiel #1
0
 private void Interact()
 {
     if (Physics.Raycast(camera.transform.position, camera.transform.forward, out RaycastHit hit, 5))
     {
         InteractionObject target = hit.transform.GetComponent <InteractionObject>();
         if (target)
         {
             target.Execute();
         }
     }
 }