Тёмный
No video :(

Joysticks in Unity , Easy to use mobile touch controller 

Hamza Herbou
Подписаться 15 тыс.
Просмотров 32 тыс.
50% 1

#madewithunity #unity3d #unity #indiegame #gamedevelopment #gamedev
Mobile Touch Controller
Easy to use and customize joystick for your game
■ASSETS:
github.com/her...
🌐Follow Me :
Facebook : / h.herbou
Instagram : / hamza_herbou
Behance : www.behance.ne...
❤Support Us :
☞Paypal :paypal.me/hamz...
☞Patreon : / herbou

Опубликовано:

 

10 янв 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 99   
@tishaak2800
@tishaak2800 2 года назад
Many thanks Out of all the other joystick tutorials This one helped me It wasnt too complicated
@retlyfast4816
@retlyfast4816 2 года назад
same
@1lsgaming27
@1lsgaming27 Год назад
Wow that was unbelievably quick and easy, excellent joystick too! I already have a script for a top down shooter using unity standard assets, but since unity 2021 dosen't support it anymore i needed a new joystick and this worked perfectly. All i had to do was replace unity's getaxis with the joystick axis and it worked instantly. I gotta sub and be back for more tutorials
@husseinal-faiz1533
@husseinal-faiz1533 2 года назад
OMG Finally!!!!!! By far the most successful tutorial ever!!!! It works. Thank you bro .
@allesklarc4835
@allesklarc4835 2 года назад
Thanks for this video. It's the best and the shortest. 👍😁
@aurthsmith3795
@aurthsmith3795 Год назад
Excellent tutorial one of the best on YT
@yajatvashisht4873
@yajatvashisht4873 2 года назад
Thanks man was exactly looking for this💯💯💯
@mrreadcode9341
@mrreadcode9341 3 года назад
Very cool please keep going I will do the same for my game and post it to my RU-vid channel
@sharkscience
@sharkscience 3 года назад
This video deserves much
@startandplay6706
@startandplay6706 2 года назад
Hey ! can you make player "rotation" and "movement" script...,
@kotanderlite1387
@kotanderlite1387 Год назад
i have a error CS1955: Non-invocable member 'Joystick.Vertical' cannot be used like a method.
@lemulitestudio
@lemulitestudio 3 года назад
Wow Just a single script I would like to switch my current mobile input to this but how do I implement a sprint drag like that of pubg or call of duty?
@wn9521
@wn9521 2 года назад
My movement animations aren't playing but the character transforms his position correctly. Any ideas why? Here's my movement Update() { inputVector = new Vector3(joystick.Horizontal() * 10f, rb.velocity.y, joystick.Vertical() * 10f); transform.LookAt(transform.position + new Vector3(inputVector.x, 0, inputVector.z)); anim.SetFloat("Move", Mathf.Abs(joystick.Horizontal()) + Mathf.Abs(joystick.Horizontal())); }
@gabriel.7495
@gabriel.7495 3 года назад
Thx so easy to do
@scenemanager9937
@scenemanager9937 2 года назад
Thanks a lot for simple and helpful tutorial!
@peeleandro
@peeleandro 3 года назад
2D ONLY HORIZONTAL Jump = vertical How can i when me drag the joystick to up and the player jump?
@herbou
@herbou 3 года назад
you can add an if statement like that: if (joystick.Vertical() > 0.5f && isGrounded){ //jump isGrounded=false; }
@peeleandro
@peeleandro 3 года назад
@@herbou oh, thank you very much :)
@Brainyplanet
@Brainyplanet 3 года назад
Thanks alot for this :)
@herbou
@herbou 3 года назад
I didn't understand your question very well. tell me what errors do you see in the console. and by the way I'm from Morocco, not India
@Nick-rq4gy
@Nick-rq4gy Год назад
seen this so amazing thank you for helping
@issue7278
@issue7278 Год назад
Suppp bro but how can i add animation to it like Running walking ????
@gagandeepsinghvirdi7419
@gagandeepsinghvirdi7419 3 года назад
thanks , straight to the point!!!
@amirmohammadyazdani6929
@amirmohammadyazdani6929 2 года назад
Thanks man, You are awesome ...!
@TheCoolestConcreteWall
@TheCoolestConcreteWall 2 года назад
it says "joystick.Horizontal cannot be used like a method" or "joystick.Vertical cannot be used like a method" what do i do??
@herbou
@herbou 2 года назад
check the comments
@dlittlehoboapps1438
@dlittlehoboapps1438 2 года назад
Thank You Great tutorial!!!
@user-tf5qd3ws6f
@user-tf5qd3ws6f 2 года назад
thank you :) sir! very easy tutorial
@remijoel1448
@remijoel1448 2 года назад
Hello... Pls how do I make the joystick to snap to finger position?.... Like I don't want the joystick to be in a fixed place. I want it that any where I touch in screen, the joystick will take action
@samcouzens9605
@samcouzens9605 2 года назад
how do I make it so that the game recognises the last direction that the character was facing because currently the idle animations don't work properly
@dragonballz6330
@dragonballz6330 3 года назад
Super 🥳🥳🥳
@infotimes6779
@infotimes6779 Год назад
thank you pro
@zenofar4761
@zenofar4761 Год назад
how to make reslove with vsc?
@aser.5603
@aser.5603 2 года назад
I owe you one!
@nabilabenhssein9175
@nabilabenhssein9175 2 года назад
Ohh the package of joystick is not included in the github
@gamedevboy1181
@gamedevboy1181 3 года назад
Wow Thanks :D
@SambhavBarik
@SambhavBarik 2 года назад
The type or namespace name 'EasyJoystick' could not be found i am facing this error
@daden4984
@daden4984 2 года назад
nice
@alenlednik
@alenlednik 3 года назад
Is there any simple way to lock joystick handle just to move horizontal (for 2d games where character can only move left and right, so no point to handle going up and down) ?
@herbou
@herbou 3 года назад
you can use a slider just like in this tuto Mega Cube 3D game clone in Unity: ru-vid.com/group/PLMWgYNtBT-xP23zlhSp2LHna08zsAI19Q
@vasiliymalyshev1495
@vasiliymalyshev1495 9 месяцев назад
@@herbou а нельзя ли этот скрипт чутка изменить? что бы handle двигался только по вертикали, например
@ashRAFKSALIM
@ashRAFKSALIM 3 года назад
Thanks a Lot!!! Brother!
@BloodScyth3
@BloodScyth3 2 года назад
i cant find the asset in unity or in the assets store could someone send the link
@vardges6482
@vardges6482 3 года назад
bro you are best thank you (:
@LitoMike
@LitoMike Год назад
i cant put the joystick on the player script
@thanhthuongtran9878
@thanhthuongtran9878 3 года назад
Thanks ^^
@lora6938
@lora6938 2 года назад
Hello!🙋🏻 Can you please show how to add smooth movement through the joystick. The movements are not as smooth as on the pc arrows. Abrupt movements when you remove your finger sharply. Can you make a video with added smoothness please !?
@rawkstar952
@rawkstar952 3 года назад
the joystick prefab is not draggable to the inspector
@a.technology1446
@a.technology1446 3 года назад
Thanks hamza
@Arraos
@Arraos 3 года назад
And what about second controller to move the camera ?
@herbou
@herbou 3 года назад
maybe use a second joystick
@ariandoichsan8595
@ariandoichsan8595 2 года назад
@@herbou can u make twin joystick like pubg mobile
@m.8443
@m.8443 Год назад
works
@mohibkhan2492
@mohibkhan2492 3 года назад
Bro you are making too much useful videos
@user-fv6nc7qi2x
@user-fv6nc7qi2x 3 года назад
hey there, thanks for the tutorial but its showing a error "Non-invocable member 'Joystick.Vertical' cannot be used like a method." after i implement the "joystick.Horizontal () ; edit: i downloaded the input package, but now it says "The type 'Joystick' already contains a definition for 'Vertical'" edit2: thats fixed (sort of) cuz im dumb and didnt see that u were draggin the joystick from the scene to the "Joystick" serealizedfeild, but the problem now is that now when i drag and drop the joystick on that, it doesnt happen, it doesnt show that ive dragged it there, and the game doesnt run with the same compiler error
@developerazcom
@developerazcom 2 года назад
I also got same Error( and if doesnt use as a method, it does not working drag & drop to [Serialized]private Joystick joystick;
@herbou
@herbou 2 года назад
you named your script Joystick ?
@gahcp8761
@gahcp8761 3 года назад
thank you
@meeperhere
@meeperhere 2 года назад
When using this with a third person camera the camera also rotates when i move the joystick. any way to solve this?
@LitoMike
@LitoMike Год назад
i have no experience in unity but my best guess is that the camera is attached to the player
@SouzoHenrique
@SouzoHenrique 2 года назад
How can I make the player rotate?
@simone_diaferia
@simone_diaferia 2 года назад
transform.position + = new Vector3 (X, Y, 0f) * speed * Time.deltaTime; With this line my character goes through all the objects even if they have the collider, how can I do to prevent this from happening?
@herbou
@herbou 2 года назад
move the rigidbody, not the transform .. public Rigidbody rb; .. .. rb.position+=.....
@vijaysuriya6179
@vijaysuriya6179 3 года назад
There's no touch input stored or called . How can this be a " Mobile touch " Controller ? Maybe this works only on keyboard and mouse .
@herbou
@herbou 3 года назад
did you try it on a mobile? i tried it and it work exactly the same as in the editor
@CAPSPORTS
@CAPSPORTS 3 года назад
The Mouse Cursor Click is the Same as a Touch in Unity
@kirankanwar4368
@kirankanwar4368 3 года назад
It is Showing An Error that - joystick.Horizontal Cannot be used like a method
@herbou
@herbou 3 года назад
did you name your script "Joystick" ?
@turotuwan7542
@turotuwan7542 3 года назад
But this assets is for commercial uses?
@herbou
@herbou 3 года назад
it's free to use 😊.. I created it by my self
@turotuwan7542
@turotuwan7542 3 года назад
@@herbou Thank you very much. Really great videos on this channel! Keep it up!!
@rizwanshaikh8175
@rizwanshaikh8175 2 года назад
Assets\script\BallMotor.cs(42,26): error CS1955: Non-invocable member 'Joystick.Horizontal' cannot be used like a method. this error occur
@herbou
@herbou 2 года назад
maybe you named one of your scripts "Joystick"
@rizwanshaikh8175
@rizwanshaikh8175 2 года назад
@@herbou how can i fix it can you plz chk plzz
@herbou
@herbou 2 года назад
if you have a script with name Joystick just change the name
@rizwanshaikh8175
@rizwanshaikh8175 2 года назад
@@herbou error fixed I removed [serializeField] and change from private to public
@herbou
@herbou 2 года назад
good
@CadaverKuma
@CadaverKuma 3 года назад
can you give me the download link to the demo scene with the controller please?
@herbou
@herbou 3 года назад
check the description
@CadaverKuma
@CadaverKuma 3 года назад
@@herbou Do i need to code it in the character? i am having troubles with doing it myself.
@helenawilsena5821
@helenawilsena5821 3 года назад
Brilliant Tutorial. I really need this. I was searching for the this joystick for many times. How to control Animation like jump run walk with this joysticks? And how to play actions with buttons.
@s.nithishmreccc614
@s.nithishmreccc614 3 года назад
ya that's looking good
@ternsmans4209
@ternsmans4209 3 года назад
i have the same code but my character not moving i also ad the player script to the player please help. public class Player : MonoBehaviour { [SerializeField] private float speed; private void Update() { float xMovement = Input.GetAxis("Horizontal"); float zMovement = Input.GetAxis("Vertical"); transform.position += new Vector3(xMovement, 0f, zMovement) * speed * Time.deltaTime; }
@herbou
@herbou 3 года назад
maybe you didn't change speed variable in the inspector. and try to add : Debug.Log(xMovement+" , "+uMovement); in the Update at the end to see if your inputs is working or not in the Console
@badriotaupani9957
@badriotaupani9957 3 года назад
what you can make Player Shop but 3d and save load on scene for me please
@herbou
@herbou 3 года назад
i already mady a shopping system in 2d .. it's the same for 3D
@badriotaupani9957
@badriotaupani9957 3 года назад
@@herbou Or U Can't Do That?? :)
@herbou
@herbou 3 года назад
i can . but it's just like i'm repeating the codes. instead of changing Player Sprite , change Prefabs, that's it
@vanmillionstudios
@vanmillionstudios 3 года назад
can't use the EasyJoystick namespace in my script!
@herbou
@herbou 3 года назад
did you add the package?
@lora6938
@lora6938 3 года назад
Hello! It's a pity that without a jump😞
@herbou
@herbou 3 года назад
this tutorial is for joystick. you can add another button and assign an event to it when the user click on it add force to the rigidbody
@lora6938
@lora6938 3 года назад
@@herbou How it might look with your code!🤔😏 Thanks, I'll try to do something about it!
@lora6938
@lora6938 3 года назад
@@herbou Hello, could you show how to add rotation of an object in the direction of movement to your script !? Please!. 🙏
@dnaminotauro3477
@dnaminotauro3477 3 года назад
Help me, I did not get it
@herbou
@herbou 3 года назад
what is the problem
@dnaminotauro3477
@dnaminotauro3477 3 года назад
@@herbou error at unity, do you have whatsapp for we talk end I'll send images of my game for you, and you teach me... ?
3 года назад
How about 2d
@herbou
@herbou 3 года назад
the same thing
Далее
Settings UI System 🛠 in Unity
16:16
Просмотров 4,8 тыс.
They made a game about philosophy...
23:19
Просмотров 404 тыс.
Unity3D/2D: Mobile Joystick Tutorial [NO PLUGINS]
10:17
A new way to generate worlds (stitched WFC)
10:51
Просмотров 523 тыс.
MrBeast Just Destroyed His Career..
22:02
Просмотров 7 млн
I Built a Transparent Boomerang (it's lethal)
13:10
Просмотров 3,6 млн
The Clever Way to Count Tanks - Numberphile
16:45
Просмотров 940 тыс.
I Tried To Beat Minecraft Backwards
18:53
Просмотров 1,2 млн