I’m trying to adapt TransformControls to scale a box by dragging on the faces (see images).
My attempt kind of works, but with some starting positions, the box scales in the wrong direction, or suddenly scales way faster/slower. I am guessing this is due to my TransformControlsPlane being placed wrong.
My question thus is: how does the TransformControlsPlane get aligned in the TransformControls?
In the source code, I can see that it doesn’t just get oriented towards the camera, but some transformations are applied depending on the current axis. Could someone help me with the reasoning behind this, so I can correctly replicate the behavior?