# “Robot 4: Translate, Rotate, Scale” (page 174) - added easing

**URL:** <https://discourse.processing.org/t/robot-4-translate-rotate-scale-page-174-added-easing/8703>\
**Category:** Coding Questions\
**Created:** [February 24, 2019, 11:02pm UTC](https://discourse.processing.org/t/robot-4-translate-rotate-scale-page-174-added-easing/8703 "2019-02-24T23:02:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dougouverson](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/dougouverson/32/3814_2.png) [@dougouverson](https://discourse.processing.org/u/dougouverson)\
**Post date:** [February 24, 2019, 11:02pm UTC](https://discourse.processing.org/t/robot-4-translate-rotate-scale-page-174-added-easing/8703/1 "2019-02-24T23:02:29Z")

</div>

I saw that easing variable was added, but no easing code was included so that easing happened. so, I modified the first few lines of function draw () to make easing happen:

```auto
function draw() {
  var targetX = mouseX;
  x += (targetX - x) * easing;
  var neckY = -1 * (bodyHeight + neckHeight + radius);
  background(204);
  translate(x, y); // Move all to (mouseX, y)

```

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [February 26, 2019, 5:13pm UTC](https://discourse.processing.org/t/robot-4-translate-rotate-scale-page-174-added-easing/8703/2 "2019-02-26T17:13:45Z")

</div>

Is that a page number from Getting Started With p5.js?

---

<div class="post-metadata">

**Author:** ![dougouverson](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/dougouverson/32/3814_2.png) [@dougouverson](https://discourse.processing.org/u/dougouverson)\
**Post date:** [March 4, 2019, 1:10pm UTC](https://discourse.processing.org/t/robot-4-translate-rotate-scale-page-174-added-easing/8703/3 "2019-03-04T13:10:07Z")

</div>

Yes, correct. 😀
