Ray ray = Camera.main.ScreenPointToRay(mousePosition);
RaycastHit2D hit = Physics2D.Raycast(ray.origin, ray.direction);
if (hit == null)
{
Debug.LogError("No hit");
}
else
{
Debug.LogError("Hit something");
Debug.LogError(hit.transform.name);
}
// *****************
if (pointyThing.GetComponent<PolygonCollider2D>().IsTouching(wedges[x].GetComponent<PolygonCollider2D>()))
{
Debug.LogError("collided");
}
// *****************
if (pointyThing.GetComponent<Renderer>().bounds.Intersects(wedges[x].GetComponent<Renderer>().bounds))
{
Debug.LogError("collided");
}