I’ve the following code snippet to detect if a sphere with rigid body and collider has been clicked

`

  Ray ray = Camera.mainCamera.ScreenPointToRay(Input.mousePosition);
  bool picked = Physics.Raycast(ray, out hit);

`

The above code snippet works as expected.

How can I detect if a sphere without rigid body and collider has been clicked?

Thanks in advance for your help.

Google “sphere ray collision” you should get a solution there. Paul Bourke (Geometry, Surfaces, Curves, Polyhedra) also has a lot of geometric math which you may find useful.