local rotation instead of world rotation

Hi @all.
If I will do a rotation with my movinglight, it seems that the axis from the arms and the head
have world orientation. How I get local rotation, in this case the orientation from the base ?
Please see the blueprint:


It depends on a number of factors. Usually, you can get the local rotation of an object by using the “Combine Rotators” node passing in the rotation you want and the parent object’s current rotation. Scene Components also have a “Set Relative Rotation” node that will allow you to set rotation local to their immediate parent.

Of course, if your original pivots aren’t set up correctly, you will have trouble with rotations. It looks from the pictures like you’re trying to rotate the head over pitch and its original pivot is where the base is, but it’s hard to tell for sure.

If this is the case, you can go back to your 3D program and re-export the object with the corrected pivot. When you import into Unreal, the pivot of the object is reset to the origin of the world, regardless of where you originally placed it.

Alternatively, you can set this particular component to be the child of an empty Scene Component and rotate that instead, so you have more freedom of control over where the pivot is.

Yes, it works right now. I have replaced the 2 nodes “set world rotation” on the right with “set relative rotation” for the arms and the head.
Now I can rotate the whole movinglight while the head rotates correctly and looks straight to the target.
Thank you for your help.

perfect! Happy coding!