# Setting limits for following the mouse on the y-axis

**URL:** <https://forum.kirupa.com/t/setting-limits-for-following-the-mouse-on-the-y-axis/200074>\
**Category:** Uncategorized\
**Created:** [September 8, 2006, 1:27pm UTC](https://forum.kirupa.com/t/setting-limits-for-following-the-mouse-on-the-y-axis/200074 "2006-09-08T13:27:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BigDukeyDog](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@BigDukeyDog](https://forum.kirupa.com/u/BigDukeyDog)\
**Post date:** [September 8, 2006, 1:27pm UTC](https://forum.kirupa.com/t/setting-limits-for-following-the-mouse-on-the-y-axis/200074/1 "2006-09-08T13:27:02Z")

</div>

hey there i’ve been looking through the forums and online and i can find stuff that is close to what i want but not exactly. i have a face and i have the eyes following the mouse and would like the eyelids to move as well but not move past a certain point. i’ve tried doing if-else but as you’ll see my coding needs improvement, lots. i have attached two versions. one that has easing which i would love to include but i will settle for just limiting the movements. if anybody could help me i’d greatly appreciate it.

thanks!

duke
