Quantcast
Channel: Questions in topic: "gun"
Viewing all articles
Browse latest Browse all 592

Automatic Shooting Script

$
0
0
***First off:*** **I'm from Germany sorry for my english** ---------- i've been written a Script to shoot a single Prefab. But now i want an automatic Gun. sooooo...... Can Anybody help me to make this shooting Script 'automatic' ? Here is the Script: var Projectile : Rigidbody; var ProjectileSpeed : int = 10; function Update () { if (Input.GetButtonDown("Fire1")) { var clone : Rigidbody; clone = Instantiate(Projectile, transform.position, transform.rotation); clone.velocity = transform.TransformDirection (Vector3.forward * ProjectileSpeed); } }

Viewing all articles
Browse latest Browse all 592

Trending Articles



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