UKismetInputLibrary::PointerEvent_GetGestureDelta
#include "Kismet/KismetInputLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns the change in gesture value since the last gesture event of the same type, such as a pinch-to-zoom or two-finger scroll delta.
Caveats & Gotchas
- • Meaning of the X/Y components depends on the gesture type from PointerEvent_GetGestureType — e.g. Magnify typically only uses one axis — check the gesture type before interpreting the vector.
- • Zero for pointer events that aren't part of an active gesture sequence.
Signature
static FVector2D PointerEvent_GetGestureDelta(const FPointerEvent& Input); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Input | const FPointerEvent& | The pointer event to read the gesture delta from. | — |
Return Type
FVector2D Example
Scroll a list from a two-finger scroll gesture C++
FReply UMyWidget::NativeOnTouchGesture(const FGeometry& InGeometry, const FPointerEvent& InGestureEvent)
{
const FVector2D Delta = UKismetInputLibrary::PointerEvent_GetGestureDelta(InGestureEvent);
if (UKismetInputLibrary::PointerEvent_GetGestureType(InGestureEvent) == ESlateGesture::Scroll)
{
ScrollListView(Delta.Y);
}
return FReply::Handled();
} See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?