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

MuzzleFlash for gun

$
0
0
Hi, i need my gun to shoot with a muzzle flash. i have a prefab but it just loops and loops i want it so that i can right click and it plays the prefab thing.(hope i make sence) all helped would be appreciated. Thanks in advance, orangec0w oh here's the shoot script to if you need it: var projectile : Rigidbody; var speed = 10; function Update (){ if(Input.GetButtonUp("Fire1")) { clone = Instantiate(projectile, transform.position, transform.rotation); clone.velocity = transform.TransformDirection(Vector3(0,0, speed)); Destroy (clone.gameObject, 5); audio.Play(); }}

Viewing all articles
Browse latest Browse all 592

Trending Articles



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