Quantcast
Channel: Latest Questions by FKKrjakonzo
Viewing all articles
Browse latest Browse all 8

Projectiles

$
0
0
Could someone help me with this script: var projectile : Rigidbody; var speed = 20; function Update () { if ( Input.Input.GetMouseButtonUp(0)) { clone = Instantiate(projectile, transform.position, transform.rotation); clone.velocity = transform.TransformDirection( Vector3 (0, 0, speed)); Destroy (clone.gameObject, 3); }} Problem here it is that this script create a lot of this objects but i want only one in 2 seconds. Sorry for bad english

Viewing all articles
Browse latest Browse all 8

Trending Articles



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