three.js: there are multiple problems with TransformControls
The effect of scaling is not independent of scene / object dimensions. I had to change these lines to
if ( scope.axis === "X" ) scope.object.scale.x = oldScale.x * ( 1 + 0.01 * point.x / oldScale.x );
if ( scope.axis === "Y" ) scope.object.scale.y = oldScale.y * ( 1 + 0.01 * point.y / oldScale.y );
if ( scope.axis === "Z" ) scope.object.scale.z = oldScale.z * ( 1 + 0.01 * point.z / oldScale.z );
to get sane scaling sensitivity in my project quickly.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 23 (21 by maintainers)
Commits related to this issue
- New TransformControls implementation. Improved rotation interactions with radial and linear mode depending on facing angle. Fixes #13806 and #7947. Added auto-hiding for axis facing camera. Fixes #1... — committed to arodic/three.js by arodic 6 years ago
- Fixed scaling implementation in TransformControls. Fixes #10916, #9312, #5489 and #5379 — committed to arodic/three.js by arodic 6 years ago
- New TransformControls implementation. Improved rotation interactions with radial and linear mode depending on facing angle. Fixes #13806 and #7947. Added auto-hiding for axis facing camera. Fixes #1... — committed to arodic/three.js by arodic 6 years ago
- Fixed scaling implementation in TransformControls. Fixes #10916, #9312, #5489 and #5379 Fixed rotation at negative scale. Merged TransformControls into one file and updated examples. Added rotatio... — committed to arodic/three.js by arodic 6 years ago
- Fixed scaling implementation in TransformControls. Fixes #10916, #9312, #5489 and #5379 Fixed rotation at negative scale. Merged TransformControls into one file and updated examples. Added rotatio... — committed to arodic/three.js by arodic 6 years ago
- Fixed scaling implementation in TransformControls. Fixes #10916, #9312, #5489 and #5379 Fixed rotation at negative scale. Merged TransformControls into one file and updated examples. Added rotatio... — committed to arodic/three.js by arodic 6 years ago
- Fixed scaling implementation in TransformControls. Fixes #10916, #9312, #5489 and #5379 Fixed rotation at negative scale. Merged TransformControls into one file and updated examples. Added rotatio... — committed to arodic/three.js by arodic 6 years ago
- New TransformControls implementation. Improved rotation interactions with radial and linear mode depending on facing angle. Fixes #13806 and #7947. Added auto-hiding for axis facing camera. Fixes #1... — committed to arodic/three.js by arodic 6 years ago
- Fixed scaling implementation in TransformControls. Fixes #10916, #9312, #5489 and #5379 Fixed rotation at negative scale. Merged TransformControls into one file and updated examples. Added rotatio... — committed to arodic/three.js by arodic 6 years ago
- New TransformControls implementation. Improved rotation interactions with radial and linear mode depending on facing angle. Fixes #13806 and #7947. Added auto-hiding for axis facing camera. Fixes #1... — committed to arodic/three.js by arodic 6 years ago
- Fixed scaling implementation in TransformControls. Fixes #10916, #9312, #5489 and #5379 Fixed rotation at negative scale. Merged TransformControls into one file and updated examples. Added rotatio... — committed to arodic/three.js by arodic 6 years ago
- Squashed commit of the following: commit a1daef37e5a6b80d0173af54edd000202b95fca5 Author: Mr.doob <info@mrdoob.com> Date: Tue Jul 31 09:13:45 2018 -0700 r95 commit 22db2d7d0bf48ca39c8555a1786... — committed to opensim-org/three.js by aymanhab 6 years ago
Sorry @makc I haven’t done anything with three.js in a long time although I would really love to work on it again.
@sandromartis world space scale is not really possible without another transformation matrix. I would suggest to parent the object you want to scale to an empty Object3D, and scale that instead. If you look at how Maya handles it, scaling in world space doesn’t modify object’s scale attribute. Instead, it modifies vertex positions in world space. It essentially bakes transformation into geometry and that’s not something you cant reset/undo to neutral scale.
This issue is fixed in alternate version of TransformControls But as mentioned in #7947 this fix depends on somewhat modular approach to making big and complex scene manipulation tools.
I hope to revisit this project in near future but I don’t see the clear path towards contributing fixes back into threejs. I could manually combine all the dependencies into single monolithic TransformControls.js once I get to it.
On the bright side, next fork of that fiddle will be 1337