I can not tie an actor to a component of another actor during the game.
If I attach an actor to the function BeginPlay, then everything works as it should. But if I attach by pressing a key, then the actor simply becomes motionless.
This is the code:
collisionBody->SetSimulatePhysics(false);
AttachToComponent(parentSceneComponent, FAttachmentTransformRules(EAttachmentRule::SnapToTarget,EAttachmentRule::SnapToTarget,EAttachmentRule::SnapToTarget,true), socketName);