[FONT=Gill Sans MT,sans-serif]// Snap to socket if a valid socket name was provided, otherwise attach without changing the relative transform
[FONT=Gill Sans MT,sans-serif]const bool bValidSocketName = !SocketName.IsNone() && ParentRoot->DoesSocketExist(SocketName);
[FONT=Gill Sans MT,sans-serif]ChildRoot->AttachToComponent(ParentRoot, bValidSocketName ? FAttachmentTransformRules::SnapToTargetNotIncludingScale : FAttachmentTransformRules::KeepWorldTransform, SocketName);
4.20 code:
[FONT=Gill Sans MT,sans-serif]// Snap to socket if a valid socket name was provided, otherwise attach without changing the relative transform
[FONT=Gill Sans MT,sans-serif]ChildRoot->AttachToComponent(ParentRoot, FAttachmentTransformRules::KeepWorldTransform, SocketName);
Seems unintended since the comment does not match what the code does now.
I’ve been having the same issue with mine. I tried changing the code to the old version but it didn’t seem to work (maybe cause I’m not running a C++ source version).
Did you ever manage to do something that makes the snap to sockets work like it used to?
Yes. Changed the source code above and recompiled the engine. Its been 2 version and still seems broken. Not snapping to socket is the more rare use case. Not sure what the reasoning behind this is …
What you can do is attach the actor, go to details, and zero out the relative transform.