Rotate a geometry around its axis after translate

Hello, I have a question regarding rotation around object’s center. I have moved an object’s geometry by ‘translate’ and then I want to rotate it around its own axis, not world axis. Could anyone please help me with this matter? and if you suggest to use object.rotateOnAxis( axis, radians ); then how can I find axis passing through the center of the moved(translated) object? Many thanks!

That’s a classic. :sunglasses:

To achieve that, you need to:

  1. revert the translation
  2. do the rotation
  3. re-apply the translation
2 Likes

Another solution which may or may not be more appropriate for your use case is to put the object you need to rotate as child of another object such as a Group. Then translate the parent object relative to the world origin and rotate the child object which is relative to its parent.

1 Like