In the details panel you can set rotation type to World (it defaults relative) so the rotation of the attached actor stays in world space and doesn’t rotate when my character rotates.
How do I set that in C++?
I thought this was set with the FAttachmentTransformRules, but it looks like that is only taken into account while actually doing the attachment and not afterwards like the rotation type.
i dont know if you solved it but here is how to solve it, Gnimmel solution is working and i had the same issue as you, that my object is actor.
just get the root component of your actor and use (attach component to component) and attach your object root component to the other actor root component but before you attach make sure to (Set Absolute)