move socket name to a temp var for easier debugging

This commit is contained in:
Mamadou Babaei
2023-05-12 15:47:21 +02:00
parent 4bd143c3c8
commit 45f6ecacd2
@@ -1227,13 +1227,15 @@ void ASGPawn::GrabLeft(AActor* Actor)
return;
}
FAttachmentTransformRules AttachmentTransformRules{
FAttachmentTransformRules AttachmentRules{
FAttachmentTransformRules(GrabComponent->GetAttachmentLocationRule(),
GrabComponent->GetAttachmentRotationRule(),
GrabComponent->GetAttachmentScaleRule(),
GrabComponent->GetAttachmentWeldSimulatedBodies())
};
Actor->AttachToComponent(HandLeft, MoveTemp(AttachmentTransformRules), GrabComponent->GetAttachmentSocketName());
FName SocketName{GrabComponent->GetAttachmentSocketName()};
Actor->AttachToComponent(HandLeft, MoveTemp(AttachmentRules), MoveTemp(SocketName));
ActorLeftHandGrabbing = Actor;
}
@@ -1251,13 +1253,15 @@ void ASGPawn::GrabRight(AActor* Actor)
return;
}
FAttachmentTransformRules AttachmentTransformRules{
FAttachmentTransformRules AttachmentRules{
FAttachmentTransformRules(GrabComponent->GetAttachmentLocationRule(),
GrabComponent->GetAttachmentRotationRule(),
GrabComponent->GetAttachmentScaleRule(),
GrabComponent->GetAttachmentWeldSimulatedBodies())
};
Actor->AttachToComponent(HandRight, MoveTemp(AttachmentTransformRules), GrabComponent->GetAttachmentSocketName());
FName SocketName{GrabComponent->GetAttachmentSocketName()};
Actor->AttachToComponent(HandRight, MoveTemp(AttachmentRules), MoveTemp(SocketName));
ActorRightHandGrabbing = Actor;
}