Is there a way to make a character sprint,use,… with a xbox controller?
I have seen a tutorial on youtube but it was with a payed asset…
You’ll want to investigate the input manager: Edit → Project Settings → Input.
View documentation:
By default, every project comes with horizontal/vertical axes, Fire1, Fire2, Jump, Submit, Cancel, and more for both keyboard and gamepad. You can add more, or change the existing inputs. I don’t recommend removing the submit and cancel inputs; they’re necessary for Unity’s built-in UI system.
I have seen that!
But i am a new noob so i dont know anything about unity…
I am using the default character fps controller asset and cant find the input name for sprinting…
Do you know where i can find it?
I want to make it so when i press the left joystick in the character will sprint
View the input manager; if there is an input you don’t want or need, you can change it to the input you want. For example, if you don’t like “Jump” having “joystick button 3” assigned (that’s the Y button on XBox controllers), you can change it to “joystick button 2” (that’s the X button on XBox controllers). You may also rename an input. For example, if you don’t need a “Fire2” button, you can rename it “sprint” and set the positive button (or alt positive button) to the joystick button you want. The links I gave above should help you get started on configuring your inputs.
I don’t think there is any documentation for what qualified names exist for joystick inputs. I refer to this page on the Unify wiki when I need to: http://wiki.unity3d.com/index.php?title=Xbox360Controller
So for clicking the left joystick, it would be “joystick button 8” according to the link. It looks like it will vary between Windows, macOS, and Linux, however.
The second link I provided in my original post (“Conventional Game Input”) gives an example for checking input via script:
value = Input.GetKey("a")
Unfortunately, it doesn’t provide any other examples. This page: Unity - Scripting API: Input does provide a simple example:
if (Input.GetButtonDown("Fire1"))
{
Debug.Log(Input.mousePosition);
}
So, following this example, you can get the name of a specific input by its name. For example:

If my input for sprint is set up as shown, then in my script, I can use the following:
if (Input.GetButtonDown("sprint"))
{
sprint = !sprint;
}
Then when I click my left joystick, the variable “sprint” in my script will be inverted. That is to say if sprint is false, it will be set to true; if it is true, it will be set to false.
I’m assuming you at least know something about programming. My examples assume you are using C#. If you are using JavaScript instead, it shouldn’t be hard to convert the code. If you are not a programmer, or if you have never done programming before, you will have to learn if you want to do it yourself. ![]()
EDIT: This may help you more than I might be able to via forum posts. I found it with a quick Google search; he seems to be doing pretty much exactly what you want to do. ![]()
THANK YOU!!