UKismetInputLibrary::Key_GetNavigationDirectionFromAnalog
#include "Kismet/KismetInputLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns the directional UI navigation value corresponding to an analog input event, such as a gamepad stick pushed past the navigation threshold.
Caveats & Gotchas
- • The analog value must cross the navigation config's activation threshold before a direction other than Invalid is returned — small stick deflections are ignored.
- • Only usable where a live FAnalogInputEvent is available, such as a widget's NativeOnAnalogValueChanged override.
Signature
static EUINavigation Key_GetNavigationDirectionFromAnalog(const FAnalogInputEvent& InAnalogEvent); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InAnalogEvent | const FAnalogInputEvent& | The analog input event (e.g. gamepad stick or trigger) to map to a UI navigation direction. | — |
Return Type
EUINavigation Example
Drive menu navigation from a gamepad stick C++
FReply UMyWidget::NativeOnAnalogValueChanged(const FGeometry& InGeometry, const FAnalogInputEvent& InAnalogEvent)
{
EUINavigation Direction = UKismetInputLibrary::Key_GetNavigationDirectionFromAnalog(InAnalogEvent);
if (Direction != EUINavigation::Invalid)
{
NavigateFocus(Direction);
return FReply::Handled();
}
return FReply::Unhandled();
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?