# Mouse follow without easing

**URL:** <https://forum.kirupa.com/t/mouse-follow-without-easing/122255>\
**Category:** Uncategorized\
**Created:** [September 12, 2004, 3:18am UTC](https://forum.kirupa.com/t/mouse-follow-without-easing/122255 "2004-09-12T03:18:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maverick\_xj](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@maverick\_xj](https://forum.kirupa.com/u/maverick_xj)\
**Post date:** [September 12, 2004, 3:18am UTC](https://forum.kirupa.com/t/mouse-follow-without-easing/122255/1 "2004-09-12T03:18:34Z")

</div>

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 ?

```auto
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
