Hi I am doing 2d maze game. I have an material(it stay fixed point in terrain) which is must shoot a sphare. I created sphare and put it front of the material and unclick Mesh Renderer. After that I added the scipt:
var projectile : Transform;
var bulletSpeed : float = 20;
function Update () {
var clone : Transform;
clone = Instantiate(projectile, transform.position, transform.rotation);
clone.rigidbody.AddForce(clone.transform.forward * 5000);
}
Next add Roll in a Ball in Projectile.
It fired continuously but I need delay for it. material must fire each 3 second. I tried it with a lot of ready scripts but i can not it. I am new user. Please help me. Thank you.