hey all,
i have a script here which fires a bullet every time the player hits spacebar. What i have tried doing is change Input.GetKeyDown to GetKey, but this fires too many and they all destroy each other or fly out of control :?
here is the script i’m using to fire
var bullet : Rigidbody;
var launcher : Transform;
var ShootSpeed : float = 200;
function Update () {
if(Input.GetKeyDown(“space”)){
var clone : Rigidbody;
clone = Instantiate(bullet, launcher.position, launcher.rotation);
clone.AddRelativeForce(Vector3.forward * ShootSpeed);
}
}
any help at all will be usefull :lol: thanks heaps,
Daniel