Hi, I am trying to set up a level editor type thing where when you click an object in a grid it changes. It is all in 2d but when I try to raycast2d it does not pick up any collision. The objects have circlecollider2ds and below is how I am raycasting:
RaycastHit2D hit = Physics2D.Raycast(HandleUtility.GUIPointToWorldRay(Event.current.mousePosition).origin, new Vector2(0, 0));
The origin is correct - I have checked it against the positions of the objects, but for some reason it isn’t registering any hits.
Any advice or links would be greatly appreciated.