AActor::OnInputTouchEnter
#include "GameFramework/Actor.h"
Access: public
Specifiers: UPROPERTYBlueprintAssignable
Description
Delegate fired when a finger moves onto this actor's touch area while a touch is already active and touch over events are enabled in the player controller.
Caveats & Gotchas
- • Requires bEnableTouchOverEvents on the player controller, which is separate from bEnableTouchEvents. Forgetting to enable this is the most common reason this delegate never fires.
- • This is a 'hover enter' for touch, not a new touch — the touch must have started elsewhere and dragged onto this actor. For initial touch start use OnInputTouchBegin.
Signature
FActorBeginTouchOverSignature OnInputTouchEnter Example
Highlight actor as finger drags over it C++
void ADraggableTarget::BeginPlay()
{
Super::BeginPlay();
OnInputTouchEnter.AddDynamic(this, &ADraggableTarget::OnFingerEnter);
}
void ADraggableTarget::OnFingerEnter(ETouchIndex::Type FingerIndex, AActor* TouchedActor)
{
SetHighlighted(true);
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?