yesterday i open a similar TD.
now the issue , is the rotation with a translation(position)
how make a rotation on a global axis without changing the position (translation) ?
this is the script “WIP” …
this WORK , but maybe need to a cleanup ? or is right ?
(m4 is a matrices 4x4 that i want change)
from mathutils import Matrix oldPosition = m4.translation #store the position before the transformation m4 = Matrix().Rotation(0.1, 4, "Z") * m4 #make the rotation m4.translation = oldPosition #replace the old position
i tried to make this before :
m4 = Matrix().Rotation(0.1, 4, “Z”) * m4
but this change also the position, while i not want change the position , but only the orientation…