Posted March 13, 2025 by Akhil Mathew
For the first day of the devlog, I'm adding Unity's new input manager to the game and making basic movements for the placeholder player component. The goal is to create a good functioning player movement system, so that players can zoom around in the battle arena.
The new Input manager creates an asset that handles all the needed bindings, so we could just focus on adding the logic to it. Using the asset, we could generate a C# script using Unity that handles the player's movements. This also makes it easier to add controller binds into the game effortlessly, as shown in the image below.
The GameInput.cs is used to apply the movement done using the key binds pressed to the player placeholder model, and also further changes would be made here to add other essential movements like dashing.
We normalize the input vector before returning it to make sure the player moves the same unit distance when multiple directions are given, and hence have the same speed on both straights and diagonals
As per the plan, the next step is to implement dashing mechanics, so the player has some form of way to avoid attacks, and further down the line, shooting mechanics will be implemented.
[1] Unity inputs System (version 1.5.1) - Actions: https://docs.unity3d.com/Packages/com.unity.inputsystem@1.5/manual/Actions.html#...
[2] Vector2.normalized : https://docs.unity3d.com/ScriptReference/Vector2-normalized.html