prevent scaling of a child object as parent scale increases in three.js

Viewed 53

I have a program in three.js that consists of a parent object and a few child objects. The program increases the scale of the parent object (sometimes only in one dimension, sometimes in multiple). the child objects get distorted as a result.

How it looks before scaling

1

Example of child distortion after scaling

2

I want to undo the scaling done to the child objects when the parent object is applied. I still want them to move with the parent, so clearing their relationship isn't an option I've considered.

I have tried scaling the children by 1/parentScale, but this yields oversized and inaccurate dimensions. My thinking is that either:

  • 1/parentScale shouldn't work because the parent and children objects do not share original dimension ratios (parent is 6 arbitrary units x 9 x 1.75 and children are miscellaneously sized) and therefore additional factors are needed in the un-scaling equation. Result of scaling by 1/parentScale
  • there is a way to lock the size of an object either in Blender (which is where I made my .glb file) or in Three.js that you guys can show me

I tried locking dimensions of children in Blender but it didn't work. Maybe I did it wrong.

0 Answers
Related