I don’t understand why this happens but the clones in my array only react to code on one update rather than every update. Basically I’m instantiating a prefab into an array. But whenever I go to add force on the clones in the array it only apply’s it on the same update it was created. I need the force to be applied every update. Here is the code. I’m just calling the first element to test it.
var pParticle: Transform;
var exists=false;
function Update () {
var positive=new Array();
if(Input.GetButtonDown(“Fire1”)){
positive.Add(Instantiate (pParticle, transform.position, Quaternion.identity));
var exists=true;
}
if(exists)
positive[0].rigidbody.AddForce(Vector3.forward*10);
}