document.write("
// Fill out your copyright notice in the Description page of Project Settings. /** * Specialized version of the MoveCharacterToLocation Task that uses the current position of the cursor as the Target * location when the Task is activated. */ UCLASS() class DANDELION_API UAbilityTask_MoveCharacterToCursor : public UAbilityTask_MoveCharacterToLocation { GENERATED_BODY() public: /** * Static constructor. Initializes cached references when called. * @param OwningAbility The GA that initiated this task. * @param TaskInstanceName The name of this task. * @return A newly instantiated and initialized UAbilityTask_MoveCharacterToCursor. */ UFUNCTION( BlueprintCallable, Category = "Ability|Tasks", meta = (HidePin = "OwningAbility", DefaultToSelf = "OwningAbility", BlueprintInternalUseOnly = "TRUE") ) static UAbilityTask_MoveCharacterToCursor* MoveCharacterToCursor( UDandelionGameplayAbility* OwningAbility, const FName TaskInstanceName ); protected: /** * When activated, set the TargetLocation to be the current position under the cursor. */ virtual void Activate() override; private: /** * Attempts to make a trace to determine the point under the cursor. * @return The world position under the cursor. If the trace fails, returns the zero vector. */ FVector GetPositionUnderCursor() const; };