Ejemplo n.º 1
0
 private void ProcessClick()
 {
     Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
     RaycastHit hit;
     // if there's a hit
     if (Physics.Raycast(ray, out hit, 100))
     {
         // get the current game object
         currentObject = hit.transform.gameObject;
         // animate it
         PointAnimator.Animate(currentObject);
         // get the center position in current view
         Vector3 screenCenterPos = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2, 1f));
         // update and show the panel
         PanelControl.UpdatePanel(screenCenterPos, currentObject);
   
     }
 }