Riley - V0.0.1 Devlog - Enhancing Players Inputs
At the start of a project, after all the planning is done there is not much to do other than start getting to work. In my case I had to begin setting up our player controller. This means I had to make a choice on how I wanted to handle user inputs. I figured while the legacy input system in Unreal would suit our needs for right now who knows if it will in the future. Based on this I chose to make use of the "new" Enhanced Input System part of UE5. It replaces the legacy input system but adds a tiny amount more of setup.
To get started the first thing I had to create was an Input Mapping Context. This is used to tell which device inputs will trigger different actions. The next thing I needed of course was an Input Action. Currently we just have two of these, one is for camera rotation and one is for the players WASD movement. Setting these up is easy enough and now it comes time to add them to your character script. You can do this either in Blueprint or in C++ while, I was first testing it out I went with Blueprint as it was faster to iterate in then C++ but I have now converted this same setup code to C++ which can be seen below.
Once we have made our player aware of the mapping context we wish to use but we have to bind to our Input Action events. This is simple and is done inside of SetupPlayerInputComponent.
Finally the functions we bind to these Input Actions Look something similar to this.
While the Enhanced Input system has a bit more setup, it really is a quite simple change and allows for much more flexibility than what was provided from the legacy input system.
Echo in the Shadows
Status | In development |
Authors | IDC_DEV6, aesthetical, Mrr_Memez, dgiardino |
Genre | Adventure |
Tags | Action-Adventure, Stealth |
More posts
- Sebastian - V0.0.2 Devlog - I Heard That!10 hours ago
- Riley - V0.0.2 Devlog - Crouch Animation15 hours ago
- Sebastian - V0.0.1 Devlog - Bringing Enemies to Life7 days ago
- Dominic - V0.0.1 Devlog - Creating the Tutorial and Level 17 days ago