From 02cc52b335fa1a7e3b9f2a30bf450443f6ce6dcf Mon Sep 17 00:00:00 2001 From: Kris Helwig <helwig@vr.rwth-aachen.de> Date: Mon, 14 Apr 2025 16:12:04 +0200 Subject: [PATCH] Implements hacky fix for time experiment (makes OnBeginInteractionInputAction and OnEndInteractionInputAction public) --- .../Interactors/DirectInteractionComponent.cpp | 8 ++++---- .../Interaction/Interactors/DirectInteractionComponent.h | 2 +- .../Interaction/Interactors/UBaseInteractionComponent.h | 7 ++++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Source/RWTHVRToolkit/Private/Interaction/Interactors/DirectInteractionComponent.cpp b/Source/RWTHVRToolkit/Private/Interaction/Interactors/DirectInteractionComponent.cpp index f759b37b..e0cc9af6 100644 --- a/Source/RWTHVRToolkit/Private/Interaction/Interactors/DirectInteractionComponent.cpp +++ b/Source/RWTHVRToolkit/Private/Interaction/Interactors/DirectInteractionComponent.cpp @@ -106,10 +106,10 @@ void UDirectInteractionComponent::SetupPlayerInput(UInputComponent* PlayerInputC if (EI == nullptr) return; - EI->BindAction(InteractionInputAction, ETriggerEvent::Started, this, - &UDirectInteractionComponent::OnBeginInteractionInputAction); - EI->BindAction(InteractionInputAction, ETriggerEvent::Completed, this, - &UDirectInteractionComponent::OnEndInteractionInputAction); + // EI->BindAction(InteractionInputAction, ETriggerEvent::Started, this, + // &UDirectInteractionComponent::OnBeginInteractionInputAction); + // EI->BindAction(InteractionInputAction, ETriggerEvent::Completed, this, + // &UDirectInteractionComponent::OnEndInteractionInputAction); } void UDirectInteractionComponent::OnBeginInteractionInputAction(const FInputActionValue& Value) diff --git a/Source/RWTHVRToolkit/Public/Interaction/Interactors/DirectInteractionComponent.h b/Source/RWTHVRToolkit/Public/Interaction/Interactors/DirectInteractionComponent.h index 46d2d160..10b62c82 100644 --- a/Source/RWTHVRToolkit/Public/Interaction/Interactors/DirectInteractionComponent.h +++ b/Source/RWTHVRToolkit/Public/Interaction/Interactors/DirectInteractionComponent.h @@ -28,11 +28,11 @@ public: virtual void SetupPlayerInput(UInputComponent* PlayerInputComponent) override; -private: virtual void OnBeginInteractionInputAction(const FInputActionValue& Value) override; virtual void OnEndInteractionInputAction(const FInputActionValue& Value) override; +private: UPROPERTY() TArray<UInteractableComponent*> PreviousInteractableComponentsInRange; diff --git a/Source/RWTHVRToolkit/Public/Interaction/Interactors/UBaseInteractionComponent.h b/Source/RWTHVRToolkit/Public/Interaction/Interactors/UBaseInteractionComponent.h index ca97fd7e..bb1157d2 100644 --- a/Source/RWTHVRToolkit/Public/Interaction/Interactors/UBaseInteractionComponent.h +++ b/Source/RWTHVRToolkit/Public/Interaction/Interactors/UBaseInteractionComponent.h @@ -94,10 +94,11 @@ public: void MulticastActionBehaviourReplicationStartRpc(UActionBehaviour* Behaviour, const EInteractionEventType EventType, const FInputActionValue& Value); -private: - UFUNCTION() + UFUNCTION(BlueprintCallable) virtual void OnBeginInteractionInputAction(const FInputActionValue& Value); - UFUNCTION() + UFUNCTION(BlueprintCallable) virtual void OnEndInteractionInputAction(const FInputActionValue& Value); + +private: }; -- GitLab