Is this possible with unity 3d? I know it is, but I haven't found a solution for this yet.
I tried:
function OnMouseDown ()
{
var snowball = Instantiate(snowballPrefab, GameObject.Find("SSpawnPoint").transform.position, Quaternion.identity); snowball.rigidbody.AddForce(transform.forward * 1000);
}
and it works only if I click the snowball prefab.
I would like to make this work by clicking anywhere on the screen. Any help is appreciated. Thank you!
It is somehow not working for me, I tried Imput.GetMouseButtonDown example, I tried even Input.GetButtonDown()... still no working result it acts like I didn't do nothing.