Rotate TransformControls through code

Hello. I’m trying to maintain consistency between the rotation of the transform controls and the values ​​I insert from a panel and I can’t get the rotations of the object to match the rotations I make with the transformControls. I thought that perhaps the transformControls could be rotated directly through code so that the object would always rotate with the same logic. Is there a way to simulate the rotation of transformControls through code? Thank you so much!!!

You only need to transform the attached object, transformControls should be updated automatically, if you don’t see any changes, it’s because of the space, by default transformControls is set to “world” space, if you set it to “local” space, you’ll be able to see the changes applied automatically.

Here is a quick example with transformControls set to “local” space.

1 Like