Fixed Bug where WASD Movement worked when focused on Chat Input
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user