RealDocs

UKismetInputLibrary::PointerEvent_GetWheelDelta

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

Description

Returns how far the mouse wheel turned since the last mouse event, positive for scrolling up/forward and negative for down/back.

Caveats & Gotchas

  • Magnitude isn't standardized across devices or platforms — treat it as a relative scroll amount and apply your own scaling rather than assuming a fixed step size.
  • Zero for any pointer event that isn't a wheel/scroll event, so check this in an OnMouseWheel handler rather than a generic move handler.

Signature

static float PointerEvent_GetWheelDelta(const FPointerEvent& Input);

Parameters

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

Return Type

float

Example

Zoom a camera with the mouse wheel C++
FReply UMyWidget::NativeOnMouseWheel(const FGeometry& InGeometry, const FPointerEvent& InMouseEvent)
{
    const float WheelDelta = UKismetInputLibrary::PointerEvent_GetWheelDelta(InMouseEvent);
    ZoomCamera(WheelDelta * ZoomSpeed);
    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.