# Cube moves when another cube is scaled

**URL:** <https://discourse.threejs.org/t/cube-moves-when-another-cube-is-scaled/58226>\
**Category:** Questions\
**Tags:** geometry\
**Created:** [November 16, 2023, 11:44am UTC](https://discourse.threejs.org/t/cube-moves-when-another-cube-is-scaled/58226 "2023-11-16T11:44:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![naalt0](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@naalt0](https://discourse.threejs.org/u/naalt0)\
**Post date:** [November 16, 2023, 11:44am UTC](https://discourse.threejs.org/t/cube-moves-when-another-cube-is-scaled/58226/1 "2023-11-16T11:44:10Z")

</div>

I have this “main” cube what you can scale with these scalers, but my problem is that there is another cube attached to it.  
When i scale the main cube the secondary cube doesn’t move with it. So is there any possibility to make the secondary cube reactive with the scaling so it moves with it in X axis?

![Screenshot 2023-11-16 134251](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/0/e/0e5fdbf9ba8f2f1faf38b2f2c6b305d618cabd27.png)  
 ![Screenshot 2023-11-14 104127](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/3/8/38d6450338333db512c86ff235b522cc72a0a3a8.png)

---

<div class="post-metadata">

**Author:** ![Man](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/man/32/34985_2.png) [@Man](https://discourse.threejs.org/u/Man)\
**Post date:** [November 16, 2023, 11:52am UTC](https://discourse.threejs.org/t/cube-moves-when-another-cube-is-scaled/58226/2 "2023-11-16T11:52:49Z")

</div>

I hope this thread can help you.

> [@Location of the point on the edge of a scaled object](https://discourse.threejs.org/t/location-of-the-point-on-the-edge-of-a-scaled-object/54753/2):
>
> Hello. @Michael_Nicol . How are you? I have seen the codesandbox and there is a small issue in your equation. I think the equation should be cube.position.set(xLow + xLow \* d / h, yLow + yLow \* d / h, zLow + zLow \* d / h); Here, h is initialscale. Thanks.
