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

@@ -90,6 +90,15 @@ namespace QuickStart
return;
}
// If the chat input is focused, skip movement input to avoid moving while typing.
// Still keep the floating info facing the camera for readability.
if (ChatUI.IsInputFieldFocused)
{
if (Camera.main != null)
floatingInfo.transform.LookAt(Camera.main.transform);
return;
}
float rotationDelta = 0f;
float forwardDelta = 0f;