Key Mapping Persistence between Levels


Author: Charley Weaver

One of the biggest issues I had throughout this week was attempting to set and save key mapping options between levels. We will have three different preset options for different key mappings for the game. The first being the standard WASD for movement, space and shift for flight, and mouse for camera rotation. The  second uses the left mouse click and hold for increasing height and the right mouse click and hold for descent. The third still in discussion. While these options were easily set through the key mapping contexts, I was missing one crucial element to get it to persist when starting the level: a game instance. 

Without that game instance, the controls shifted back to the default preset. Once the game instance was present, I was able to shift between the options menu, start menu, and level with the option I chose. The game instance created will not only help with key mapping, but also with other variables we would like to see persist between levels like health and stamina. 

Leave a comment

Log in with itch.io to leave a comment.