In this playground, I want to rotate one mesh and make the other two meshes follow. When the scaling sign (+ or -) matches, it is straightforward, but somehow I have one mesh whose scaling.z is negative, of course I cannot apply the rotation directly, the problem is I don’t know what calculation is needed in order for it to appear in the same rotation of the master mesh. Can anyone point me to the right direction? Thanks a lot!
Sorry seems I over simplified my question, it is more complicated than this, that is involves also different parent rotation, in this PG if you rotate the gizmos you’ll see box3 cannot follow the correct rotation:
I thought you wanted to preserve the starting rotation of box3 and rotate it relative to how the gizmo rotation has changed. If so, you just need calculate the difference of the rotation of the gizmo or source box in each frame. Something like oldRotation - currentRotation and apply the difference to the rotation of box3.
Thanks roland, my initial problem is I have difficulty finding out the correct rotation when the parent of a mesh has different rotation + scaling with another, when I want them to follow the same absolute rotation visually. But seems I have found the solution in the above playground code, though I’m not 100% sure why this works.