Covid Series! (Me bored at home making stuff)
TLDR: Create Code for: ControllerSettings, ControllerInput, ControllerTests, CharacterController. Create our Unity CharacterControllers. That's basically it, besides like getting the animations and stuff.
So today (12/13/2020) I got bored and decided "Hey! Let's learn how to make a Character Controller in Unity using an Xbox One Controller!" Well, it has been more work than anticipated, however, it has been a fun learning curve. So lets begin!
Fun Fact: Unity has Joystick1 through Joystick8, so from my understanding there can be 8 controllers simultaneously which can be used for the Long Lost Art of Game Development: Couch Coop.
So then from here I created my Input Script that uses the settings and returns the inputs from each!
REMINDER: You have to go into Unity Input Settings and setup the axis for the dpad, thumbsticks, and triggers!
Then I created a test script for making sure all of my inputs are working correctly.
From there I then headed over to Mixamo.com and Got animations for:
I imported these into Unity and setup the skeletons and everything. (I'm still new to this part so I stumbled through it and it magically worked.)
From there! I created my CharacterController and setup the blend trees for animations and everything. So it, for the most part would look like this:
Walk forward is a blend tree in the following order, Walk Backward is of a similar fashion.
StrafeLeft | Turn Left | Run | Turn Right | Strafe Right
Yes, we did only import turn/strafe right, but inside the blend tree we can checkmark Invert. So it essentially creates out turn/strafe lefts.
From there I created my Character Controller Script, which is a little buggy for now but I'll post in the future what was wrong with it exactly.
Now for a quick little video demonstrating what it is doing.
Feel free to Contact me with any questions! But remember, I'm not going to code your game for you. I have my own Games to worry about!