Skip to content

Commit

Permalink
fix to prevent player from accidently moving while using a dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
LordOfDragons committed Nov 11, 2023
1 parent 9f323d7 commit c00768c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions exampleApp/data/scripts/PlayerActionCustomColor.ds
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit c00768c

Please sign in to comment.