Getting Controller Support Working (The Awesome Benefits of Unity new Input Manager)

 Getting Controller Support Working (The Awesome Benefits of Unity new Input Manager)

Pedro J Colon

The Problem: HOW?!

We are finally at gold month. At long last, the journey is almost done. I can smell the fresh grass of victory close by. However, there is a few issues that still needs to be solved, one of these being controller support. This is important as we do want to add in local-multiplayer and one way we can add it is by trying out with controller support for split-screen play. Only question is this: HOW?!

The Solution and Its Aftermath:

What I did first was search throughout the web on how I could set it up. Thankfully, the setting up process was pretty much already done, as I had set up input actions for keyboard controls so now it was setting up the code to get it working with the redone player kart. After adding in some new key-bindings, the next thing I had to do was add in the functions for it to be used within the new KartPlayer script. Once that was done, I made a quick check with the keyboard input to see if it was working. Once I was able to confirm it was working, I then added in a new control scheme which was a gamepad scheme. Once I added it in and set up the bindings, I tested out to see if the controller works and the results speak for itself.

As you can see, while the controls work for Kart, we still need to implement UI controls for whenever the player hits pause or is maneuvering the menus. Thankfully, the gameplay works well enough with it which is great, meaning we are one more step to adding in a input manager to allow us to do local multiplayer.



Thank you for reading this and hope you have a good day!


Comments

Popular posts from this blog

The Pitfalls of Crafting a Position Placement and Lap Counter for Kart Racing Games

Troubleshooting Unity GameManager Input Handling

Only one line of code