File size: 1,512 Bytes
b315adb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | // Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Interaction/InteractionQuery.h"
#include "Interaction/Tasks/AbilityTask_WaitForInteractableTargets.h"
#include "AbilityTask_WaitForInteractableTargets_SingleLineTrace.generated.h"
struct FCollisionProfileName;
class UGameplayAbility;
class UObject;
struct FFrame;
UCLASS()
class UAbilityTask_WaitForInteractableTargets_SingleLineTrace : public UAbilityTask_WaitForInteractableTargets
{
GENERATED_UCLASS_BODY()
virtual void Activate() override;
/** Wait until we trace new set of interactables. This task automatically loops. */
UFUNCTION(BlueprintCallable, Category="Ability|Tasks", meta = (HidePin = "OwningAbility", DefaultToSelf = "OwningAbility", BlueprintInternalUseOnly = "TRUE"))
static UAbilityTask_WaitForInteractableTargets_SingleLineTrace* WaitForInteractableTargets_SingleLineTrace(UGameplayAbility* OwningAbility, FInteractionQuery InteractionQuery, FCollisionProfileName TraceProfile, FGameplayAbilityTargetingLocationInfo StartLocation, float InteractionScanRange = 100, float InteractionScanRate = 0.100, bool bShowDebug = false);
private:
virtual void OnDestroy(bool AbilityEnded) override;
void PerformTrace();
UPROPERTY()
FInteractionQuery InteractionQuery;
UPROPERTY()
FGameplayAbilityTargetingLocationInfo StartLocation;
float InteractionScanRange = 100;
float InteractionScanRate = 0.100;
bool bShowDebug = false;
FTimerHandle TimerHandle;
};
|