3D touch menu problem

Hi,

Since my GUI’s always look awful using standard buttons I’m trying to create a menu using gameobjects, I would like the player to be able to touch a cube to be able to start the game for example. My game is for android, there are no errors showing but nothing happens when i touch the cube…

public class StartGameTouch : MonoBehaviour {

		
	void Update () {
		if (Input.touchCount > 0  Input.GetTouch (0).phase == TouchPhase.Began) 
		{
			Ray ray = Camera.main.ScreenPointToRay( Input.GetTouch(0).position );
			RaycastHit hit;
			
			if ( Physics.Raycast(ray, out hit)  hit.collider.tag == "StartGameCube")
			{
				Application.LoadLevel ("Scene1");  
			}
		}
	}
}

Any suggestions?

Thanks.

Nevermind, I forgot to assign my camera as the main camera in the inspector :roll_eyes: