RealDocs

UKismetInputLibrary::PointerEvent_GetCursorDelta

function Engine Blueprint Since unknown
#include "Kismet/KismetInputLibrary.h"
Access: public Specifiers: staticBlueprintPure

Description

Returns how far the mouse cursor moved since the last pointer event was handled — the standard source for camera look and drag deltas.

Caveats & Gotchas

  • Delta is in screen pixels, not normalized — scale it by a sensitivity value before feeding it into camera rotation.
  • Not populated for touch-only gesture events; use PointerEvent_GetGestureDelta for pinch/rotate gestures instead.

Signature

static FVector2D PointerEvent_GetCursorDelta(const FPointerEvent& Input);

Parameters

Name Type Description Default
Input const FPointerEvent& The pointer event to read the movement delta from.

Return Type

FVector2D

Example

Rotate a camera from mouse movement C++
FReply UMyWidget::NativeOnMouseMove(const FGeometry& InGeometry, const FPointerEvent& InMouseEvent)
{
    const FVector2D Delta = UKismetInputLibrary::PointerEvent_GetCursorDelta(InMouseEvent);
    RotateCameraByMouseDelta(Delta * MouseSensitivity);
    return FReply::Handled();
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.