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!