move attachment rules to a temp var for easier debugging

This commit is contained in:
Mamadou Babaei
2023-05-19 18:13:59 +02:00
parent 3c91ce6c79
commit 2917c555ce
@@ -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;
}