I really need help calculating the center of the group among its dynamically changing children

ok guys, I thank you infinitely because from this discussion with you and from the research inspired by what you wrote I really learned a lot.

I now have only one problem left that I haven’t been able to solve, and it’s related to the scale

when I scale objects, if the scale axis is parallel to one of the faces, the scaling occurs correctly, while if it is not, the object is stretched during the operation, and when I release the mouse button, the object is made to “jump” somehow to a correct shape (assuming it is)

if you watch the video below for a while you can see what I mean…

Is there a way to avoid this stretching? or if the stretching is correct, is there a way to not make it jump to the new shape? in short, is there a way for the scaling operation to be consistent from start to finish? I couldn’t find a way…

I also leave the source on codepen… thanks again infinitely


1 Like