Raycasting, um MouseClick auf Objekt in Unity 2D -Spielen zu finden
RaycastHit2D hit = Physics2D.Raycast(Camera.main.ScreenToWorldPoint(Input.mousePosition), Vector2.zero);
if(hit.collider != null)
{
Debug.Log ("Target Position: " + hit.collider.gameObject.transform.position);
}
Doge Amazedo