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.
Thanks for your help. I found this useful link on http://www.realtimerendering.com/intersections.html from http://stackoverflow.com/search?q=sphere+ray+intersection
– anon566966