Hi,
Hi im having some problems pushing the two vars below into a timerupdate function while trying to stop them turning into NANs.
vx=2.3;
vy=1.3;
//they are declared private
Im passing 2 floats(vx, vy) into a class, then running a function called
update(e:TimerEvent){
trace("Update:",this.x, this.y ,vx, vy, );
this.x+=vx;
this.y+=vy
}
Right away in the trace within update, trace(“Update:”,this.x, this.y ,vx, vy, ); what happens is the output shows me the vx and vy have become NAN like so
Trace 1st pass: Update: 0 0 NaN NaN
Trace 2st pass: Update: -107374182.4 -107374182.4 NaN NaN
Any ideas this seems like a very wierd bug, the vars are all set up properly IMO.