4.22.2 Attach Actor in Editor not working correctly? Does not snap to socket

Anyone notice if you:

  • right click an actor
  • select Attach To >> another Actor >> select Socket

In 4.20 it no longer snaps the attached actor to the socket location? :frowning:

Is there a setting that was added? Seems like the default use case should snap the attached object to the socket location …

EDIT: this is still broken in 4.22.2.

Sorry if this has already been tracked down, but figured out what broke attaching.

Engine >> Source >> Editor >> UnrealEd >> Private >> EditorEngine::ParentActors()

Old 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]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. :frowning:

Hey Man,

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?

Thanks

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 … :frowning:

What you can do is attach the actor, go to details, and zero out the relative transform.

Hey [USER=“129723”]Jocko Jonson[/USER] - Did you submit a bug report? It would help our team track this issue!

No but I will now. :wink:

Great, thank you so much!

Is this solved? I don’t think so right now… Even though we are in 4.22.3

Does someone know where the concrete bug report is, so I can give it an upvote?

Is it possible to work around this issue? Because setting the relative transforms to zero, after attaching, does not work either.

Thanks!

I believe this is the issue you’re looking at: Unreal Engine Issues and Bug Tracker (UE-59094). It appears to be punted to 4.24.

Thanks Amanda.

On a side note, surprising how few people are attaching actors to other actors in the editor. :cool: