Characters don't run

cangcloud

Member
I found that when I use the keyboard, characters can run fast (press shift). When I use the Xbox one s controller, characters don't run fast. I found that characters don't run fast in the Xbox one s controller mode. This is very strange. I hope you check it
 
You'll need to enable the speed change ability in order to have the character always run. On the Unity Input component there is a state that gets enabled when the controller is plugged in which you could then use to always enable the speed change ability.

 
You'll need to enable the speed change ability in order to have the character always run. On the Unity Input component there is a state that gets enabled when the controller is plugged in which you could then use to always enable the speed change ability.

I think the problem is that you did not add the corresponding input code to the GamePad. You can look at my screenshots and use the Third Person Controller to demonstrate the scene. In the screenshots of the demonstration scene, you can clearly see your settings for the GamePad. Set the input settings for the character to run quickly, but when I press the shift key on the keyboard and move the character... the character will run quickly. This should be done after the character is created, but you said that this requires a state system , I really can’t understand. Obviously there is no one-to-one correspondence between the character’s keyboard input setting and the GamePad input setting, so there is a keyboard that allows the character to run quickly (the character moves while pressing the shift key), and when playing the game with the GamePad, it is You can’t make the character run fast. You have to know that when the game world is big, it takes more time to run fast. This is very scary. I hope you can improve it and fix it. That’s all, I think you should not commit such a low-level error.
 

Attachments

  • 2.jpg
    2.jpg
    652.7 KB · Views: 9
You'll need to enable the speed change ability in order to have the character always run. On the Unity Input component there is a state that gets enabled when the controller is plugged in which you could then use to always enable the speed change ability.

I need a video tutorial. After the character is created, you can walk, run, and jump, whether you use the keyboard or the GamePad character to perform these actions. In addition, where can I find the code for moving the character? If you don’t fix it, I have to do it myself Solve, in fact, this problem is easy to solve, I don't know if you haven't found it, or don't pay attention to this problem at all, so please tell me which script the character movement code is in.
 
You'll need to enable the speed change ability in order to have the character always run. On the Unity Input component there is a state that gets enabled when the controller is plugged in which you could then use to always enable the speed change ability.

You can watch the video I recorded. In the video, I use the keyboard and mouse to move the character. When I hold the shift button to move the character, the character will run quickly from the walk, but when I use the Gamepad, the character will not run quickly.you said that using the status system can solve this problem. I am a novice. Please record a video. I really need a video tutorial. It will not take much time to record a video tutorial. I need your help and wait for your reply.
 
You'll need to enable the speed change ability in order to have the character always run. On the Unity Input component there is a state that gets enabled when the controller is plugged in which you could then use to always enable the speed change ability.

I've solved this problem by myself. I hope you check it carefully after development. This problem is easy to solve. You are too careless.
 
For gamepad support you should use unity's new input system. The demo scene relies on the old input manager for compatibility reasons but for your actual game you'll want to use the new input system or rewired.
 
For gamepad support you should use unity's new input system. The demo scene relies on the old input manager for compatibility reasons but for your actual game you'll want to use the new input system or rewired.
You can use old input and new input, you can see my screenshot. So you can use them at the same time.
 

Attachments

  • input.JPG
    input.JPG
    201.6 KB · Views: 11
Top