Skip to content
Snippets Groups Projects
Commit f5ca8a12 authored by Römer's avatar Römer
Browse files

improves Grabbing behaviour

parent c5f9c14f
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,7 @@ void UGrabbingBehaviorComponent::HandleBeginGrab(AActor* GrabbedBy)
const FAttachmentTransformRules Rules = FAttachmentTransformRules(EAttachmentRule::KeepWorld, false);
//GetOwner()->GetRootComponent()->AttachToComponent(RightHand, Rules);
GetOwner()->GetRootComponent()->AttachToComponent(RightHand, Rules);
OnBeginGrab.Broadcast(GrabbedBy);
......@@ -56,6 +57,7 @@ void UGrabbingBehaviorComponent::HandleBeginGrab(AActor* GrabbedBy)
void UGrabbingBehaviorComponent::HandleEndGrab()
{
//GetOwner()->GetRootComponent()->DetachFromComponent(FDetachmentTransformRules::KeepWorldTransform);
GetOwner()->GetRootComponent()->DetachFromComponent(FDetachmentTransformRules::KeepWorldTransform);
OnEndGrab.Broadcast();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment