Reply to Re: lolsquitos
If you don't have an account, just leave the password field blank.
Basically infinite:
if x < mouse x: add to its speed.
if x > mouse x: subtract from its speed.
each loop: set x to x + speed.
So it basically moves towards the mouse, then keeps revolving around the mouse position because the object will never stop at a speed of 0. It speeds up, then brakes only to speed up exactly as fast as it was before.
I'm not too great at maths, so I wouldn't know any technical terms for this.
If you download the page and edit the variable "amount" to be 1, you can really see how it moves in comparison to the mouse.
if x < mouse x: add to its speed.
if x > mouse x: subtract from its speed.
each loop: set x to x + speed.
So it basically moves towards the mouse, then keeps revolving around the mouse position because the object will never stop at a speed of 0. It speeds up, then brakes only to speed up exactly as fast as it was before.
I'm not too great at maths, so I wouldn't know any technical terms for this.
If you download the page and edit the variable "amount" to be 1, you can really see how it moves in comparison to the mouse.






