I have the most basic shooting script: Code (JavaScript): #pragma strict var theBullet : Rigidbody; var Speed = 20; function Update () { if (Input.GetKey(KeyCode.Joystick1Button5)) { var clone = Instantiate(theBullet, transform.position, transform.rotation); clone.velocity = transform.TransformDirection(Vector3(0, 0, Speed)); Destroy (clone.gameObject, 1); } } When I have it to left mouse click for testing, it shoots one bullet per click. I have it set to R, and if I hold it down it will constantly shoot. Anyway to fix this?
"Input.GetKeyDown" what you should use "Input.GetKeyUp" good for plasma cannon/charging type weapon Or use a boolean and some Yield WaitForSeconds(); perhaps, many ways you could do it.