RealDocs

AActor::NotifyActorOnInputTouchEnd

function Engine Since 4.0
#include "GameFramework/Actor.h"
Access: public Specifiers: virtualENGINE_API

Description

Called when a finger is lifted off this actor when click events are enabled in the PlayerController. Override to handle the end of a touch interaction.

Caveats & Gotchas

  • The touch-end notification is only delivered if the finger was still considered over this actor when released; if the finger dragged away first, you may receive a TouchLeave notification instead but not this call.
  • Like NotifyActorOnInputTouchBegin, bEnableClickEvents and bEnableTouchEvents must both be true on the PlayerController for this to fire.
  • There is no guarantee of symmetry: a touch-end call will not occur for every touch-begin if the actor is destroyed mid-gesture.

Signature

ENGINE_API virtual void NotifyActorOnInputTouchEnd(const ETouchIndex::Type FingerIndex);

Parameters

Name Type Description Default
FingerIndex const ETouchIndex::Type Which finger was lifted (Touch1 through Touch10).

Return Type

void

Example

Override to respond to touch end C++
void AMyActor::NotifyActorOnInputTouchEnd(const ETouchIndex::Type FingerIndex)
{
	Super::NotifyActorOnInputTouchEnd(FingerIndex);
	// Deactivate on finger lift
	DeactivateActor();
}

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.