That is because action.x and action.y is in screen space and the raycast is in world space. In order to determine if a game object is clicked or not, here is one of may threads discussing the topic:
That is because action.x and action.y is in screen space and the raycast is in world space. In order to determine if a game object is clicked or not, here is one of may threads discussing the topic: