This script allows you to assign a button that will fix the player's direction when the button is pressed.
This is useful if you wish to allow players to lock their direction while moving, for example if you want to provide "strafe movement" by moving side to side.
A switch is provided to enable or disable the button's direction fixing behavior. The switch must be turned on in order for the button to fix the player's direction. This may be useful when you are creating a cut-scene and you don't want player actions to affect it.