Hi guys I am trying to attach one new component to an SkeletalMesh in Character, the component is created but not attached somebody could help me in this quest?
Here’s the code:
USphereComponent* SphereComponent = CreateDefaultSubobject<USphereComponent>(TEXT("LHandCollision2"));
USceneComponent* SkeletalMeshReferenceComponent = GetCapsuleComponent()->GetChildComponent(2);
SphereComponent->AttachToComponent(SkeletalMeshReferenceComponent, FAttachmentTransformRules::KeepWorldTransform, TEXT("L_HandSocket"));
SphereComponent->InitSphereRadius(30.0f);
Love