Fixed Bug where WASD Movement worked when focused on Chat Input

This commit is contained in:
pelpanagiotis
2026-02-04 22:39:40 +02:00
parent 1a564d392a
commit 9bcb47d8f6
18 changed files with 182 additions and 1903 deletions

View File

@@ -81,6 +81,12 @@ public class CharacterMovement : NetworkBehaviour
if (kb.dKey.isPressed) keyboardMovement.x += 1f;
}
// Disable keyboard WASD while typing in chat input
if (ChatUI.IsInputFieldFocused)
{
keyboardMovement = Vector2.zero;
}
// combine input action movement and keyboard movement
combinedMovement = currentMovement + keyboardMovement;
// prevent faster diagonal movement