title: Unity | Scale an object between two points (2D)
body: <p>I have a point A and a point B, with a distance AB between both. I also have an object K with a width 1 and a height 1.</p>
  <p>Given that, I have to scale the object K to fit between the points A and B. After centering the object in the position <code>(B - A) / 2</code>, what should I do?</p>
  <p><a href="https://i.stack.imgur.com/PeDdK.png" rel="nofollow noreferrer">Descriptive picture</a></p>
  <p>Thanks!</p>