title: Use Raycast on canvas child gameobject
body: <p>I'm using this joystick and Mirror for networking</p>
  <p><a href="https://github.com/herbou/Unity_EasyJoystick" rel="nofollow noreferrer">https://github.com/herbou/Unity_EasyJoystick</a></p>
  <p>What I wanted is to detect the gameobject Joystick which is the child of Canvass using Raycast</p>
  <p><a href="https://i.stack.imgur.com/BIX7a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BIX7a.png" alt="enter image description here" /></a></p>
  <p>I've tried this script</p>
  <pre><code>public class ShootBullet : NetworkBehaviour
  {
      [SerializeField]
      private GameObject bulletPrefab;
      private GameObject bullet;
  
      // Set via the Inspector in Units/second
      [SerializeField] private float _moveSpeed = 2f;
      [SerializeField] private Camera _camera;
      Vector3 touch_Pos = new Vector3(0, 0, 0);
  
      private void Awake()
      {
          if (!_camera) _camera = Camera.main;
      }
  
      void Update()
      {
          if (Input.touchCount &gt; 0 &amp;&amp; this.isLocalPlayer)
          {
              Ray ray = _camera.ScreenPointToRay(Input.GetTouch(0).position);
              RaycastHit hit;
  
              if (Physics.Raycast(ray, out hit))
              {
                  if (hit.collider != null)
                  {
                      Debug.Log(hit.collider.gameObject.name);
                  }
              }
          }
          
      }
  
  }
  </code></pre>
  <p>But it doesn't work</p>