Hello,
I'm new to unity and 2d toolkit.
I'm working through the Whack a Mole Tutorial.
Everything seems to be fine except when I click on the moles nothing happens.
I've added some debug statements
void Update()
{
// Check to see if mouse has been clicked, and if so check to see if it has 'hit' any of the moles, and check which mole.
//if(Input.GetMouseButtonDown(0))
if(Input.GetButtonDown("Fire1"))
{
Debug.Log("Pressed left click.");
Ray ray = gameCam.ScreenPointToRay(Input.mousePosition);
RaycastHit hit = new RaycastHit();
if(Physics.Raycast(ray, out hit))
{
Debug.Log("Inside If Physics.Raycast.")
..........
........
.....
I am seeing the debug statement for the mouse click but not the Physics.Raycast
I notice the main camera looks a little bit odd. The camera bounds do not seem to line up. However the "tk2d camera preview" looks good and the "camera preview" looks to only be seeing what the white camera bounds are seeing.
My Scene looks like this: