From c00768cded0a7cea1ba7eb39e5996cb68c1a67ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pl=C3=BCss=20Roland?= Date: Sat, 11 Nov 2023 13:45:48 +0100 Subject: [PATCH] fix to prevent player from accidently moving while using a dialog --- exampleApp/data/scripts/PlayerActionCustomColor.ds | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/exampleApp/data/scripts/PlayerActionCustomColor.ds b/exampleApp/data/scripts/PlayerActionCustomColor.ds index bfd77a2..e766e34 100644 --- a/exampleApp/data/scripts/PlayerActionCustomColor.ds +++ b/exampleApp/data/scripts/PlayerActionCustomColor.ds @@ -343,6 +343,11 @@ class PlayerActionCustomColor extends BAAFirstPerson case State.interact // Interact with the element if dialog == null + // Clear all player input. This prevents the player from accidentially moving + // for example because he keeps on pressing the stick on his gamepad + playerInputMove.reset() + locomotion.stopMoving() + // Show dialog dialog = DialogEditColors.new(changeCustomColors)