Disable Default UI Thumbstick Navigation?

So…
Hopefully… my last problem with UI in common… not just common UI…

By default, unreal handles the directional Inputs by default Input Methods.
Keyboard-Cursors, Gamepad D-Pad AND… Analog (Thumb-) Sticks…

Last one is a Problem… since i want my Player being able to walk around, while f.e. the Inventory is opened and controlable…

Problem… when the Player walks around, the Inventory Slots switch… cause UI registers the Thumbstick Inputs as UI Input…

So… my Question:
How to disable Thumbstick Input for UI?
So the Player can still walk around, and the UI can be controlled with D-Pad only?

tried Solutions:

2 Likes

Did you Find an fix for this problem ? I want to know too !

Set is focusable to false for all of your buttons used as inventory slots.

Which would make the Inventory not controlable while walking.

I made a compromise by switching Left and Right Thumbstick via custom Slate Navigation.

Not perfect, but acceptable .

What I did is just to turn all them off and use input event to control and highlights UI parts with different kinds of arrays. It works for me since set focus interrupts the input I think.

The provided solution is not ideal and did not work for me.
Here’s how I did it (described also here Disable analog stick input on UMG? - #11 by SumbodySumwher )

I created a function that accesses the NavigationConfig from FSlateApplication, and setts the bAnalogNavigation to true/false.

#include "Framework/Application/NavigationConfig.h"

void AMyPlayerController::ToggleThumbstickUiNavigation(bool ThumbstickNavigationEnabled) {
	if (FSlateApplication::IsInitialized()) {
		TSharedRef<FNavigationConfig> currentNavConfig = FSlateApplication::Get().GetNavigationConfig();
		currentNavConfig->bAnalogNavigation = ThumbstickNavigationEnabled;
		FSlateApplication::Get().SetNavigationConfig(currentNavConfig);
	}
}
2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.