hey guys
i just read the tutorial on mouse follow with easing
i’ve been trying to work on it … not that its that hard …
but what i’ve been trying to do is to make an object get to the mouse with any easing … at a constant rate
probably i’m skipping on some concept, but i’m gettin into line equations n stuff … which is makin the code really comlpicated and still there are some hiccups in the code
can anyone come up with a code in which there is no easing ?
onClipEvent (load) {
_x = 0;
_y = 0;
speed = 5;
}
onClipEvent (enterFrame) {
endX = _root._xmouse;
endY = _root._ymouse;
_x += (endX-_x)/speed;
_y += (endY-_y)/speed;
}
in this code , division with the constant “speed” is what results in the easing
but i’m talkin about the object approaching the mouse at a constant rate