Hi, need to add fire rate to our shooting script, can you please hlep. here is our script.
using UnityEngine;
using System.Collections;
public class Shoot2 : MonoBehaviour
{
public Rigidbody projectile;
public float speed = 1;
void Update ()
{
if (Input.GetButtonDown(“Fire2”))
{
Rigidbody instantiatedProjectile = Instantiate(projectile,transform.position,transform.rotation)as Rigidbody;
instantiatedProjectile.velocity = transform.TransformDirection(new Vector3(180, 2,speed));
}
}
}