# Moving toward mouse at constant speed

**URL:** <https://forum.kirupa.com/t/moving-toward-mouse-at-constant-speed/201030>\
**Category:** Uncategorized\
**Created:** [September 18, 2006, 12:14am UTC](https://forum.kirupa.com/t/moving-toward-mouse-at-constant-speed/201030 "2006-09-18T00:14:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hcjc92](https://avatars.discourse-cdn.com/v4/letter/h/a88e57/32.png) [@hcjc92](https://forum.kirupa.com/u/hcjc92)\
**Post date:** [September 18, 2006, 12:14am UTC](https://forum.kirupa.com/t/moving-toward-mouse-at-constant-speed/201030/1 "2006-09-18T00:14:18Z")

</div>

i know you can make something move toward the mouse with

```auto

this._x+=(_root._xmouse-this._x)/speed

```

but when you get closer to the mouse it slows down, is there anyway to make it do this, but not slow down when it gets closer?
