From 2917c555ceadd6f882cd7952619dc0121709693b Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Fri, 12 May 2023 15:43:25 +0200 Subject: [PATCH] move attachment rules to a temp var for easier debugging --- .../Private/SenseGlove/GameFramework/SGPawn.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPawn.cpp b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPawn.cpp index 5cb60523..a1dc7b56 100644 --- a/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPawn.cpp +++ b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPawn.cpp @@ -1227,13 +1227,13 @@ void ASGPawn::GrabLeft(AActor* Actor) return; } - Actor->AttachToComponent( - HandLeft, + FAttachmentTransformRules AttachmentTransformRules{ FAttachmentTransformRules(GrabComponent->GetAttachmentLocationRule(), GrabComponent->GetAttachmentRotationRule(), GrabComponent->GetAttachmentScaleRule(), - GrabComponent->GetAttachmentWeldSimulatedBodies()), - GrabComponent->GetAttachmentSocketName()); + GrabComponent->GetAttachmentWeldSimulatedBodies()) + }; + Actor->AttachToComponent(HandLeft, MoveTemp(AttachmentTransformRules), GrabComponent->GetAttachmentSocketName()); ActorLeftHandGrabbing = Actor; } @@ -1251,13 +1251,13 @@ void ASGPawn::GrabRight(AActor* Actor) return; } - Actor->AttachToComponent( - HandRight, + FAttachmentTransformRules AttachmentTransformRules{ FAttachmentTransformRules(GrabComponent->GetAttachmentLocationRule(), GrabComponent->GetAttachmentRotationRule(), GrabComponent->GetAttachmentScaleRule(), - GrabComponent->GetAttachmentWeldSimulatedBodies()), - GrabComponent->GetAttachmentSocketName()); + GrabComponent->GetAttachmentWeldSimulatedBodies()) + }; + Actor->AttachToComponent(HandRight, MoveTemp(AttachmentTransformRules), GrabComponent->GetAttachmentSocketName()); ActorRightHandGrabbing = Actor; }