diff --git a/Source/UTAD_UI/UTAD_UIPlayerController.cpp b/Source/UTAD_UI/UTAD_UIPlayerController.cpp index 8a9b3fa..5c2c0e1 100644 --- a/Source/UTAD_UI/UTAD_UIPlayerController.cpp +++ b/Source/UTAD_UI/UTAD_UIPlayerController.cpp @@ -81,7 +81,7 @@ void AUTAD_UIPlayerController::SetupInputComponent() if (OpenSkillTreeAction) { EnhancedInputComponent->BindAction( - OpenSkillTreeAction, ETriggerEvent::Triggered, this, + OpenSkillTreeAction, ETriggerEvent::Started, this, &AUTAD_UIPlayerController::OnOpenSkillTree); } } @@ -210,8 +210,11 @@ void AUTAD_UIPlayerController::HideSkillTree() { SkillTreeWidget->RemoveFromParent(); - // Set input mode back to game only - FInputModeGameOnly InputMode; + // Set input mode back to game and UI for top-down gameplay + // This allows mouse clicks to work for character movement + FInputModeGameAndUI InputMode; + InputMode.SetLockMouseToViewportBehavior(EMouseLockMode::DoNotLock); + InputMode.SetHideCursorDuringCapture(false); SetInputMode(InputMode); // Keep mouse cursor visible for top-down game bShowMouseCursor = true;