Unity3D- Add Controller Support in 5 Minutes With No Coding!

preview_player
Показать описание
UPDATE- This video is outdated now! You can still use this method for the time being with the old UnityEngine.Input API, but that is being replaced with the Input System Package for newer versions of Unity. Maybe there will be a new video when I figure it out myself! Now, the old video description:

So, your player controller script has all those calls to Input.GetButton() and Input.GetAxis(), right? Let's set up your game to recognize controllers without touching your script!

Here's the controller map I used as reference. Remember that Axes 4 and 5 are swapped!

And follow me for all kinds of game stuff-
Рекомендации по теме
Комментарии
Автор

This is extremely convenient i just finished my basic movement like you. I thought it was funny that the default jump for me was the Y button Y axis when i realized why it was like that I chuckled

SkanDogVids
Автор

BROOO THANK YOU SO MUCH ! I have an exam tomorrow (im in an art school) and I couldnt find a way to fix the camera so I was panicking and I then I found your video: you saved my life !!! straight to the point and all, I hope you are rich bro u deserve to succeed in life ! tomorrow I will update you about my exam and if i pass this exam you played a part in it bro so thank you again for helping the community u are a hero

lounesb
Автор

You are my hero!!!! I just got a pc controller to use in Unity, and I couldn't figure out how to spin the camera. Thank you good sir! Thank you!!!

rossj
Автор

literally thank you so much every single unity/stack overflow article were making the solutions way more complicated than need be!!

grimbithefloob
Автор

I've literally been searching for this for 2 weeks mow. Thanks

AnySL
Автор

good video, but how can I add attacks on combination of buttons? Like I use a ps4 controller and I want my skills to be on R2+Square, triangle etc.

KidouKenshi
Автор

Will this also work in note pad I’m trying to change the controls for a mod

ronnyrrr
Автор

How to get joysick position? Like Input.mousePosition but for joysick

beansheeran
Автор

"With no coding!"

Within first minute, opens C#

jordand
Автор

Triggers, sticks and d-pad doesnt work for some reason. ..

GreedAndSelfishness
Автор

i almost completely switched the new input system and almost ruined my game thanks man😅

Sir-Evil_Laughington
Автор

Good Tut, beautiful and apt.. great job you got here. 📌

JvDonGames
Автор

Which visual Studio are you using brother?

shahryarahmad
Автор

will this work with netcode and online multiplayer?

dynogamergurl
Автор

When I do this: my character rotates to the left and downward infinitely. I can counter it with my mouse. But the stick does nothing. Except act as if I’m holding it SW. when I’m not. And I did a diagnostic test and it looks to be functioning fine. I’ve had no issues with it in the past either.

Any idea what’s going on? I’m doing a first person controller if that makes a difference.

spray_cheese
Автор

when my player flips the controls flip too im using a ball so it rotates the entire time

grisu
Автор

Hi Son Of Gragas you can choose to use both the input thingies so u can have the new and old will this still work??

aagaming
Автор

excellent tutorial bro!!! :D
thank you very much!!! \(^.^)/

LaughingMajora
welcome to shbcf.ru