Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

shoot prefab at mouse point

$
0
0
hi friends i am trying to shoot prefab at mouse point can any one help me out go = new GameObject[3]; var prefab:GameObject; var prefab2:GameObject; var prefab3:GameObject; function Start(){ go[0]= prefab3; go[1]=prefab; go[2]=prefab2; var ins = Instantiate(go[Random.Range(0,3)], position, Quaternion.identity); } at present i am using above code to instantiate prefab randomly after instantiate how should i shoot randomly instantiated prefab at mouse point when i click my mouse button can any one help me please

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>