From fb7f42ed0985f0a6b6555c8d35dc11b197ab4672 Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Thu, 18 May 2023 19:03:03 +0200 Subject: [PATCH] refactor and remove the need to cache the component in the grab/release workflow --- .../SenseGlove/GameFramework/SGPawn.cpp | 120 ++++++------------ .../GameFramework/SGPlayerController.cpp | 2 +- .../GameFramework/SGVirtualHandActor.cpp | 8 +- .../SenseGlove/Haptics/SGGrabState.cpp | 19 +-- .../Public/SenseGlove/GameFramework/SGPawn.h | 10 +- .../Public/SenseGlove/Haptics/SGGrabState.h | 18 +-- .../Private/SGKismet/SGPawnKismetLibrary.cpp | 13 +- .../Public/SGKismet/SGPawnKismetLibrary.h | 6 +- 8 files changed, 61 insertions(+), 135 deletions(-) diff --git a/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPawn.cpp b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPawn.cpp index 76ae1a15..b7bf9766 100644 --- a/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPawn.cpp +++ b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPawn.cpp @@ -80,6 +80,9 @@ struct ASGPawn::FImpl void BindFingerTouchOverlapEvents(); void UnbindFingerTouchOverlapEvents(); + + void DisableActorPhysics(const AActor* Actor) const; + void EnableActorPhysics(const AActor* Actor) const; }; ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer) @@ -429,10 +432,10 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer) RightPinkyFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap); RightPinkyFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap); - LeftHandGrabState = FSGGrabState(HandLeft, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); + LeftHandGrabState = FSGGrabState(HandLeft, nullptr, nullptr, nullptr, nullptr); LeftHandTouchState = FSGTouchState(HandLeft, nullptr, nullptr, nullptr, nullptr, nullptr); - RightHandGrabState = FSGGrabState(HandLeft, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); + RightHandGrabState = FSGGrabState(HandLeft, nullptr, nullptr, nullptr, nullptr); RightHandTouchState = FSGTouchState(HandRight, nullptr, nullptr, nullptr, nullptr, nullptr); } @@ -503,7 +506,6 @@ void ASGPawn::OnLeftThumbFingertipGrabColliderOverlapBegins( if (USGGrabComponent::IsGrabbable(OtherActor)) { LeftHandGrabState.ActorThumbCanGrab = OtherActor; - LeftHandGrabState.ComponentThumbCanGrab = OtherComp; GrabStateUpdatedEvent.Broadcast(LeftHandGrabState); } } @@ -520,7 +522,6 @@ void ASGPawn::OnLeftThumbFingertipGrabColliderOverlapEnds( if (LeftHandGrabState.ActorThumbCanGrab == OtherActor) { LeftHandGrabState.ActorThumbCanGrab = nullptr; - LeftHandGrabState.ComponentThumbCanGrab = nullptr; GrabStateUpdatedEvent.Broadcast(LeftHandGrabState); } } @@ -541,7 +542,6 @@ void ASGPawn::OnLeftIndexFingertipGrabColliderOverlapBegins( if (USGGrabComponent::IsGrabbable(OtherActor)) { LeftHandGrabState.ActorIndexCanGrab = OtherActor; - LeftHandGrabState.ComponentIndexCanGrab = OtherComp; GrabStateUpdatedEvent.Broadcast(LeftHandGrabState); } } @@ -558,7 +558,6 @@ void ASGPawn::OnLeftIndexFingertipGrabColliderOverlapEnds( if (LeftHandGrabState.ActorIndexCanGrab == OtherActor) { LeftHandGrabState.ActorIndexCanGrab = nullptr; - LeftHandGrabState.ComponentIndexCanGrab = nullptr; GrabStateUpdatedEvent.Broadcast(LeftHandGrabState); } } @@ -579,7 +578,6 @@ void ASGPawn::OnLeftMiddleFingertipGrabColliderOverlapBegins( if (USGGrabComponent::IsGrabbable(OtherActor)) { LeftHandGrabState.ActorMiddleCanGrab = OtherActor; - LeftHandGrabState.ComponentMiddleCanGrab = OtherComp; GrabStateUpdatedEvent.Broadcast(LeftHandGrabState); } } @@ -596,7 +594,6 @@ void ASGPawn::OnLeftMiddleFingertipGrabColliderOverlapEnds( if (LeftHandGrabState.ActorMiddleCanGrab == OtherActor) { LeftHandGrabState.ActorMiddleCanGrab = nullptr; - LeftHandGrabState.ComponentMiddleCanGrab = nullptr; GrabStateUpdatedEvent.Broadcast(LeftHandGrabState); } } @@ -807,7 +804,6 @@ void ASGPawn::OnRightThumbFingertipGrabColliderOverlapBegins( if (USGGrabComponent::IsGrabbable(OtherActor)) { RightHandGrabState.ActorThumbCanGrab = OtherActor; - RightHandGrabState.ComponentThumbCanGrab = OtherComp; TouchStateUpdatedEvent.Broadcast(LeftHandTouchState); } } @@ -824,7 +820,6 @@ void ASGPawn::OnRightThumbFingertipGrabColliderOverlapEnds( if (RightHandGrabState.ActorThumbCanGrab == OtherActor) { RightHandGrabState.ActorThumbCanGrab = nullptr; - RightHandGrabState.ComponentThumbCanGrab = nullptr; GrabStateUpdatedEvent.Broadcast(RightHandGrabState); } } @@ -845,7 +840,6 @@ void ASGPawn::OnRightIndexFingertipGrabColliderOverlapBegins( if (USGGrabComponent::IsGrabbable(OtherActor)) { RightHandGrabState.ActorIndexCanGrab = OtherActor; - RightHandGrabState.ComponentIndexCanGrab = OtherComp; GrabStateUpdatedEvent.Broadcast(RightHandGrabState); } } @@ -862,7 +856,6 @@ void ASGPawn::OnRightIndexFingertipGrabColliderOverlapEnds( if (RightHandGrabState.ActorThumbCanGrab == OtherActor) { RightHandGrabState.ActorIndexCanGrab = nullptr; - RightHandGrabState.ComponentIndexCanGrab = nullptr; GrabStateUpdatedEvent.Broadcast(RightHandGrabState); } } @@ -883,7 +876,6 @@ void ASGPawn::OnRightMiddleFingertipGrabColliderOverlapBegins( if (USGGrabComponent::IsGrabbable(OtherActor)) { RightHandGrabState.ActorMiddleCanGrab = OtherActor; - RightHandGrabState.ComponentMiddleCanGrab = OtherComp; GrabStateUpdatedEvent.Broadcast(RightHandGrabState); } } @@ -900,7 +892,6 @@ void ASGPawn::OnRightMiddleFingertipGrabColliderOverlapEnds( if (RightHandGrabState.ActorMiddleCanGrab == OtherActor) { RightHandGrabState.ActorMiddleCanGrab = nullptr; - RightHandGrabState.ComponentMiddleCanGrab = nullptr; GrabStateUpdatedEvent.Broadcast(RightHandGrabState); } } @@ -1122,7 +1113,7 @@ bool ASGPawn::IsGrabbing(const USGVirtualHandComponent* Hand, AActor*& OutActor) return Hand == HandLeft ? IsLeftHandGrabbing(OutActor) : IsRightHandGrabbing(OutActor); } -void ASGPawn::Grab(USGVirtualHandComponent* Hand, AActor* Actor, UPrimitiveComponent* Component) +void ASGPawn::Grab(USGVirtualHandComponent* Hand, AActor* Actor) { if (!ensureAlwaysMsgf(IsValid(Actor), TEXT("%s"), TEXT("ERROR: invalid actor!"))) { @@ -1147,26 +1138,7 @@ void ASGPawn::Grab(USGVirtualHandComponent* Hand, AActor* Actor, UPrimitiveCompo if (GrabComponent->GetAffectPhysicsState()) { - const USceneComponent* ActorRootComponent{Cast(Actor->GetRootComponent())}; - if (!ensureAlwaysMsgf(IsValid(ActorRootComponent), TEXT("%s"), TEXT("ERROR: invalid actor's root component!"))) - { - return; - } - TArray ActorChildrenComponents; - ActorRootComponent->GetChildrenComponents(true, ActorChildrenComponents); - for (USceneComponent* SceneComponent: ActorChildrenComponents) - { - UPrimitiveComponent* PrimitiveComponent{Cast(SceneComponent)}; - if (IsValid(PrimitiveComponent)) - { - PrimitiveComponent->SetSimulatePhysics(false); - } - } - - if (IsValid(Component)) - { - Component->SetSimulatePhysics(false); - } + Pimpl->DisableActorPhysics(Actor); } const bool bAttached = Actor->AttachToComponent(Hand, MoveTemp(AttachmentRules), SocketName); @@ -1202,31 +1174,10 @@ void ASGPawn::ReleaseLeft() if (GrabComponent->GetAffectPhysicsState()) { - const UPrimitiveComponent* ActorRootComponent{ - Cast(LeftHandGrabState.GrabbedActor->GetRootComponent()) - }; - if (ensureAlwaysMsgf(IsValid(ActorRootComponent), TEXT("%s"), TEXT("ERROR: invalid actor's root component!"))) - { - TArray ActorChildrenComponents; - ActorRootComponent->GetChildrenComponents(true, ActorChildrenComponents); - for (USceneComponent* SceneComponent: ActorChildrenComponents) - { - UPrimitiveComponent* PrimitiveComponent{Cast(SceneComponent)}; - if (IsValid(PrimitiveComponent)) - { - PrimitiveComponent->SetSimulatePhysics(true); - } - } - } - - if (IsValid(LeftHandGrabState.GrabbedComponent)) - { - LeftHandGrabState.GrabbedComponent->SetSimulatePhysics(true); - } + Pimpl->EnableActorPhysics(LeftHandGrabState.GrabbedActor); } LeftHandGrabState.GrabbedActor = nullptr; - LeftHandGrabState.GrabbedComponent = nullptr; } void ASGPawn::ReleaseRight() @@ -1251,31 +1202,10 @@ void ASGPawn::ReleaseRight() if (GrabComponent->GetAffectPhysicsState()) { - const UPrimitiveComponent* ActorRootComponent{ - Cast(LeftHandGrabState.GrabbedActor->GetRootComponent()) - }; - if (ensureAlwaysMsgf(IsValid(ActorRootComponent), TEXT("%s"), TEXT("ERROR: invalid actor's root component!"))) - { - TArray ActorChildrenComponents; - ActorRootComponent->GetChildrenComponents(true, ActorChildrenComponents); - for (USceneComponent* SceneComponent: ActorChildrenComponents) - { - UPrimitiveComponent* PrimitiveComponent{Cast(SceneComponent)}; - if (IsValid(PrimitiveComponent)) - { - PrimitiveComponent->SetSimulatePhysics(true); - } - } - } - - if (IsValid(RightHandGrabState.GrabbedComponent)) - { - RightHandGrabState.GrabbedComponent->SetSimulatePhysics(true); - } + Pimpl->EnableActorPhysics(RightHandGrabState.GrabbedActor); } RightHandGrabState.GrabbedActor = nullptr; - RightHandGrabState.GrabbedComponent = nullptr; } ASGPawn::FImpl::FImpl(ASGPawn* InOwner) @@ -1470,6 +1400,38 @@ void ASGPawn::FImpl::UnbindFingerTouchOverlapEvents() Owner, &ASGPawn::OnRightPinkyFingertipTouchColliderOverlapEnds); } +void ASGPawn::FImpl::DisableActorPhysics(const AActor* Actor) const +{ + TArray ActorComponents; + Actor->GetComponents(ActorComponents); + for (USceneComponent* SceneComponent: ActorComponents) + { + UPrimitiveComponent* PrimitiveComponent{Cast(SceneComponent)}; + if (IsValid(PrimitiveComponent)) + { + PrimitiveComponent->SetEnableGravity(false); + PrimitiveComponent->SetSimulatePhysics(false); + PrimitiveComponent->SetCollisionEnabled(ECollisionEnabled::NoCollision); + } + } +} + +void ASGPawn::FImpl::EnableActorPhysics(const AActor* Actor) const +{ + TArray ActorComponents; + Actor->GetComponents(ActorComponents); + for (USceneComponent* SceneComponent: ActorComponents) + { + UPrimitiveComponent* PrimitiveComponent{Cast(SceneComponent)}; + if (IsValid(PrimitiveComponent)) + { + PrimitiveComponent->SetEnableGravity(true); + PrimitiveComponent->SetSimulatePhysics(true); + PrimitiveComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics); + } + } +} + ASGPawn::FImpl::~FImpl() = default; void ASGPawn::FImplDeleter::operator()(const FImpl* P) const diff --git a/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp index f35477fa..d666a360 100644 --- a/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp +++ b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp @@ -229,7 +229,7 @@ void ASGPlayerController::BeginPlay() { if (SGPawn->CanGrab(GrabState.Hand, GrabState.ActorThumbCanGrab)) { - SGPawn->Grab(GrabState.Hand, GrabState.ActorThumbCanGrab, GrabState.ComponentThumbCanGrab); + SGPawn->Grab(GrabState.Hand, GrabState.ActorThumbCanGrab); } } }); diff --git a/Source/SenseGlove/Private/SenseGlove/GameFramework/SGVirtualHandActor.cpp b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGVirtualHandActor.cpp index c62f7319..84c97a6d 100644 --- a/Source/SenseGlove/Private/SenseGlove/GameFramework/SGVirtualHandActor.cpp +++ b/Source/SenseGlove/Private/SenseGlove/GameFramework/SGVirtualHandActor.cpp @@ -249,7 +249,7 @@ ASGVirtualHandActor::ASGVirtualHandActor(const FObjectInitializer& ObjectInitial WristTracker->SetRight(VirtualHand->IsRight()); - GrabState = FSGGrabState(VirtualHand, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); + GrabState = FSGGrabState(VirtualHand, nullptr, nullptr, nullptr, nullptr); TouchState = FSGTouchState(VirtualHand, nullptr, nullptr, nullptr, nullptr, nullptr); } @@ -307,7 +307,6 @@ void ASGVirtualHandActor::OnThumbFingertipGrabColliderOverlapBegins( if (USGGrabComponent::IsGrabbable(OtherActor)) { GrabState.ActorThumbCanGrab = OtherActor; - GrabState.ComponentThumbCanGrab = OtherComp; GrabStateUpdatedEvent.Broadcast(GrabState); } } @@ -324,7 +323,6 @@ void ASGVirtualHandActor::OnThumbFingertipGrabColliderOverlapEnds( if (GrabState.ActorThumbCanGrab == OtherActor) { GrabState.ActorThumbCanGrab = nullptr; - GrabState.ComponentThumbCanGrab = nullptr; GrabStateUpdatedEvent.Broadcast(GrabState); } } @@ -345,7 +343,6 @@ void ASGVirtualHandActor::OnIndexFingertipGrabColliderOverlapBegins( if (USGGrabComponent::IsGrabbable(OtherActor)) { GrabState.ActorIndexCanGrab = OtherActor; - GrabState.ComponentIndexCanGrab = OtherComp; GrabStateUpdatedEvent.Broadcast(GrabState); } } @@ -362,7 +359,6 @@ void ASGVirtualHandActor::OnIndexFingertipGrabColliderOverlapEnds( if (GrabState.ActorIndexCanGrab == OtherActor) { GrabState.ActorIndexCanGrab = nullptr; - GrabState.ComponentIndexCanGrab = nullptr; GrabStateUpdatedEvent.Broadcast(GrabState); } } @@ -383,7 +379,6 @@ void ASGVirtualHandActor::OnMiddleFingertipGrabColliderOverlapBegins( if (USGGrabComponent::IsGrabbable(OtherActor)) { GrabState.ActorMiddleCanGrab = OtherActor; - GrabState.ComponentMiddleCanGrab = OtherComp; GrabStateUpdatedEvent.Broadcast(GrabState); } } @@ -400,7 +395,6 @@ void ASGVirtualHandActor::OnMiddleFingertipGrabColliderOverlapEnds( if (GrabState.ActorMiddleCanGrab == OtherActor) { GrabState.ActorMiddleCanGrab = nullptr; - GrabState.ComponentMiddleCanGrab = nullptr; GrabStateUpdatedEvent.Broadcast(GrabState); } } diff --git a/Source/SenseGlove/Private/SenseGlove/Haptics/SGGrabState.cpp b/Source/SenseGlove/Private/SenseGlove/Haptics/SGGrabState.cpp index 4166eacf..49560704 100644 --- a/Source/SenseGlove/Private/SenseGlove/Haptics/SGGrabState.cpp +++ b/Source/SenseGlove/Private/SenseGlove/Haptics/SGGrabState.cpp @@ -35,7 +35,6 @@ #include "SenseGlove/Haptics/SGGrabState.h" -#include "Components/SphereComponent.h" #include "GameFramework/Actor.h" #include "SenseGlove/Components/SGVirtualHandComponent.h" @@ -43,33 +42,21 @@ FSGGrabState::FSGGrabState() : Hand(nullptr), ActorThumbCanGrab(nullptr), - ComponentThumbCanGrab(nullptr), ActorIndexCanGrab(nullptr), - ComponentIndexCanGrab(nullptr), ActorMiddleCanGrab(nullptr), - ComponentMiddleCanGrab(nullptr), - GrabbedActor(nullptr), - GrabbedComponent(nullptr) + GrabbedActor(nullptr) { } FSGGrabState::FSGGrabState(USGVirtualHandComponent* InHand, AActor* InActorThumbCanGrab, - UPrimitiveComponent* InComponentThumbCanGrab, AActor* InActorIndexCanGrab, - UPrimitiveComponent* InComponentIndexCanGrab, AActor* InActorMiddleCanGrab, - UPrimitiveComponent* InComponentMiddleCanGrab, - AActor* InGrabbedActor, - UPrimitiveComponent* InGrabbedComponent) + AActor* InGrabbedActor) : Hand(InHand), ActorThumbCanGrab(InActorThumbCanGrab), - ComponentThumbCanGrab(InComponentThumbCanGrab), ActorIndexCanGrab(InActorIndexCanGrab), - ComponentIndexCanGrab(InComponentIndexCanGrab), ActorMiddleCanGrab(InActorMiddleCanGrab), - ComponentMiddleCanGrab(InComponentMiddleCanGrab), - GrabbedActor(InGrabbedActor), - GrabbedComponent(InGrabbedComponent) + GrabbedActor(InGrabbedActor) { } \ No newline at end of file diff --git a/Source/SenseGlove/Public/SenseGlove/GameFramework/SGPawn.h b/Source/SenseGlove/Public/SenseGlove/GameFramework/SGPawn.h index d58b2e42..3708856f 100644 --- a/Source/SenseGlove/Public/SenseGlove/GameFramework/SGPawn.h +++ b/Source/SenseGlove/Public/SenseGlove/GameFramework/SGPawn.h @@ -589,17 +589,17 @@ public: } public: - FORCEINLINE void GrabLeft(AActor* Actor, UPrimitiveComponent* Component) + FORCEINLINE void GrabLeft(AActor* Actor) { - Grab(HandLeft, Actor, Component); + Grab(HandLeft, Actor); } - FORCEINLINE void GrabRight(AActor* Actor, UPrimitiveComponent* Component) + FORCEINLINE void GrabRight(AActor* Actor) { - Grab(HandRight, Actor, Component); + Grab(HandRight, Actor); } - void Grab(USGVirtualHandComponent* Hand, AActor* Actor, UPrimitiveComponent* Component); + void Grab(USGVirtualHandComponent* Hand, AActor* Actor); void ReleaseLeft(); diff --git a/Source/SenseGlove/Public/SenseGlove/Haptics/SGGrabState.h b/Source/SenseGlove/Public/SenseGlove/Haptics/SGGrabState.h index bfdadf0c..c12a1b51 100644 --- a/Source/SenseGlove/Public/SenseGlove/Haptics/SGGrabState.h +++ b/Source/SenseGlove/Public/SenseGlove/Haptics/SGGrabState.h @@ -56,37 +56,21 @@ public: UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove") AActor* ActorThumbCanGrab; - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove") - UPrimitiveComponent* ComponentThumbCanGrab; - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove") AActor* ActorIndexCanGrab; - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove") - UPrimitiveComponent* ComponentIndexCanGrab; - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove") AActor* ActorMiddleCanGrab; - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove") - UPrimitiveComponent* ComponentMiddleCanGrab; - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove") AActor* GrabbedActor; - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove") - UPrimitiveComponent* GrabbedComponent; - public: FSGGrabState(); explicit FSGGrabState(USGVirtualHandComponent* InHand, AActor* InActorThumbCanGrab, - UPrimitiveComponent* InComponentThumbCanGrab, AActor* InActorIndexCanGrab, - UPrimitiveComponent* InComponentIndexCanGrab, AActor* InActorMiddleCanGrab, - UPrimitiveComponent* InComponentMiddleCanGrab, - AActor* InGrabbedActor, - UPrimitiveComponent* InGrabbedComponent); + AActor* InGrabbedActor); }; \ No newline at end of file diff --git a/Source/SenseGloveKismet/Private/SGKismet/SGPawnKismetLibrary.cpp b/Source/SenseGloveKismet/Private/SGKismet/SGPawnKismetLibrary.cpp index 58789117..7f9e22b8 100644 --- a/Source/SenseGloveKismet/Private/SGKismet/SGPawnKismetLibrary.cpp +++ b/Source/SenseGloveKismet/Private/SGKismet/SGPawnKismetLibrary.cpp @@ -208,20 +208,19 @@ bool UPawnKismetLibrary::IsGrabbing(const ASGPawn* Pawn, const USGVirtualHandCom return Pawn->IsGrabbing(Hand); } -void UPawnKismetLibrary::GrabLeft(ASGPawn* Pawn, AActor* Actor, UPrimitiveComponent* Component) +void UPawnKismetLibrary::GrabLeft(ASGPawn* Pawn, AActor* Actor) { - Pawn->GrabLeft(Actor, Component); + Pawn->GrabLeft(Actor); } -void UPawnKismetLibrary::GrabRight(ASGPawn* Pawn, AActor* Actor, UPrimitiveComponent* Component) +void UPawnKismetLibrary::GrabRight(ASGPawn* Pawn, AActor* Actor) { - Pawn->GrabRight(Actor, Component); + Pawn->GrabRight(Actor); } -void UPawnKismetLibrary::Grab( - ASGPawn* Pawn, USGVirtualHandComponent* Hand, AActor* Actor, UPrimitiveComponent* Component) +void UPawnKismetLibrary::Grab(ASGPawn* Pawn, USGVirtualHandComponent* Hand, AActor* Actor) { - Pawn->Grab(Hand, Actor, Component); + Pawn->Grab(Hand, Actor); } void UPawnKismetLibrary::ReleaseLeft(ASGPawn* Pawn) diff --git a/Source/SenseGloveKismet/Public/SGKismet/SGPawnKismetLibrary.h b/Source/SenseGloveKismet/Public/SGKismet/SGPawnKismetLibrary.h index 4f7c73d8..4ca49372 100644 --- a/Source/SenseGloveKismet/Public/SGKismet/SGPawnKismetLibrary.h +++ b/Source/SenseGloveKismet/Public/SGKismet/SGPawnKismetLibrary.h @@ -162,13 +162,13 @@ public: static bool IsGrabbing(const ASGPawn* Pawn, const USGVirtualHandComponent* Hand); UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn") - static void GrabLeft(UPARAM(ref) ASGPawn* Pawn, AActor* Actor, UPrimitiveComponent* Component); + static void GrabLeft(UPARAM(ref) ASGPawn* Pawn, AActor* Actor); UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn") - static void GrabRight(UPARAM(ref) ASGPawn* Pawn, AActor* Actor, UPrimitiveComponent* Component); + static void GrabRight(UPARAM(ref) ASGPawn* Pawn, AActor* Actor); UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn") - void Grab(UPARAM(ref) ASGPawn* Pawn, USGVirtualHandComponent* Hand, AActor* Actor, UPrimitiveComponent* Component); + void Grab(UPARAM(ref) ASGPawn* Pawn, USGVirtualHandComponent* Hand, AActor* Actor); UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn") void ReleaseLeft(UPARAM(ref) ASGPawn* Pawn);