Keybindings
Explanation of the 'Keybindings' window
This guide walks you through the Keybindings window and how to use it to add new Actions to your game.
At some point in your project, you may want to add interactions to your game. To do so, you may add an action, triggered by pressing a key. However, some players may have a different keyboard, or want to change the keys. Fortunately, you do not need to worry about it, as Bettervoxel takes care of this for you! You just need to define the name of the action, and it's default key, and the Engine will let the user change it if needed.
Step 1: Keybindings Window
First, go to the Keybindings window. Inside of it, you will see the following:
Step 2: Add a KeyBind
To add a new KeyBind, click on the "Add Keybind" button. You will then see a window pop up:
Give the keybind the name you would like to use in your code. Then, click on the button in front of "KeyBind", and press the button you would like to associate: For example, the key "Space" for the action "Jump"
/// GIF OU ON DONNE LE NOM JUMP ET APPUIE SUR SPACE?
Press "Save" to create your new KeyBind!
Step 3: View and Remove Keybinds
As the popup window disappears, you should see you KeyBind appear in the "Keybindings" window. All existing KeyBindings will appear here.
If you would like to remove a KeyBind, you can simply click the "Remove" button.