RealDocs

AActor::OnInputTouchLeave

property Engine Blueprint Since 4.0
#include "GameFramework/Actor.h"
Access: public Specifiers: UPROPERTYBlueprintAssignable

Description

Delegate fired when a moving finger leaves this actor's touch area while a touch is active and touch over events are enabled in the player controller.

Caveats & Gotchas

  • Like OnInputTouchEnter, this requires bEnableTouchOverEvents on the player controller — it will not fire with only bEnableTouchEvents enabled.
  • If the finger is lifted while still over the actor, OnInputTouchLeave does not fire — only OnInputTouchEnd fires in that case.

Signature

FActorEndTouchOverSignature OnInputTouchLeave

Example

Remove highlight when finger moves away C++
void ADraggableTarget::BeginPlay()
{
    Super::BeginPlay();
    OnInputTouchLeave.AddDynamic(this, &ADraggableTarget::OnFingerLeave);
}

void ADraggableTarget::OnFingerLeave(ETouchIndex::Type FingerIndex, AActor* TouchedActor)
{
    SetHighlighted(false);
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.