Тёмный

Mobile Joystick with NEW Input System and Cinemachine - Unity Tutorial 

samyam
Подписаться 77 тыс.
Просмотров 81 тыс.
50% 1

Learn how to make a third person controller for mobile using the new input system and Cinemachine. Works for Unity 2019.3 and up and am currently using version 2020.1.
ᐅGet the full Source Code Bundle to my Unity Tutorials 🤓
sam-yam.itch.io/samyam-full-s...
At 15:10 I meant to say that the reason we set it to 0 is to avoid the gravity from accumulating when on the ground. If you fell off an edge without jumping your character would shoot straight down since your gravity keeps gaining -9.8f at the end of the Update method.
📥 Get the Source Code 📥
/ mobile-joystick-39734467
🔗 Relevant Video Links 🔗
ᐅEasier way to override Cinemachine values with Input System
• How to use the NEW Inp...
ᐅCharacter Controller Script:
docs.unity3d.com/ScriptRefere...
🤝 Support Me 🤝
Patreon: / samyg
Donate: ko-fi.com/samyam
Disclosure: This post may contain affiliate links, which means we may receive a commission if you click a link and purchase something that we have recommended. While clicking these links won't cost you any money, they will help me fund my development projects while recommending great assets!
😎 Cool Unity Assets 😎
ᐅPeek - Editor Toolkit: assetstore.unity.com/packages...
ᐅEditor Console Pro: assetstore.unity.com/packages...
ᐅRainbow Folders 2: assetstore.unity.com/packages...
💖💖THANK YOU TO ALL MY PATRONS 💖💖
❯❯❯ My Links ❮❮❮
💗 Patreon 💗
/ samyg
💬 Discord Server 💬
/ discord
🐦 Twitter 🐦
/ samyam_utube
📚 Facebook 📚
/ samyam.youtube
🎵 Music 🎵
Fretless by Kevin MacLeod
Link: incompetech.filmmusic.io/song...
License: creativecommons.org/licenses/b...
👍 Like and Subscribe! 👍
🖥️ Computer Setup 🖥️
*As an Amazon Associate I earn from qualifying purchases.
www.amazon.com/shop/samyam
#unity3d #unitytutorial #unity2021

Хобби

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

 

28 июл 2020

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 405   
@samyam
@samyam 3 года назад
Instead of making a CameraLook script for overriding the Cinemachine old input system values, use the Cinemachine Input Provider instead it’s much simpler: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-we4CGmkPQ6Q.html
@ajayprasad6218
@ajayprasad6218 3 года назад
im having this error Assets\Joystick Pack\Scripts\playercontroller.cs(18,13): error CS0246: The type or namespace name 'Player' could not be found (are you missing a using directive or an assembly reference?
@ajayprasad6218
@ajayprasad6218 3 года назад
tried some online solutions but didnt work
@ZeyFight
@ZeyFight 3 года назад
@@ajayprasad6218 Save your input
@samyam
@samyam 3 года назад
Make sure that the thing you are referencing is called Player with the capitalization matched too
@wanchester6626
@wanchester6626 2 года назад
@@samyam hey can u send me a link to the input system because i cant find it in assets store, thnx in advance
@Pixelith
@Pixelith 3 года назад
This was super helpful just in that I had no idea Samples were a thing. I've been trying to use the touch inputs to make a simple drag and move system for hours and it's honestly just easier to use a transparent joystick over the whole screen. Subscribed, great tutorial!
@DerperDoing
@DerperDoing 3 года назад
Literally, the only tutorial I found about touch control joystick using the new Input system. Thank you so much!
@brian.g.716
@brian.g.716 3 года назад
Just came here from your Cinemachine Third Person Controller tutorial and once again, YOU ARE A BEAUTIFUL HUMAN!!! THANK YOU!! :D
@rawkstar952
@rawkstar952 3 года назад
FINALLY! I need this for my capstone project. Thanks!
@huehuehuehuehuehuehue
@huehuehuehuehuehuehue 4 года назад
Wow great timing, I was just looking in to this!
@chamudpathirana
@chamudpathirana 3 года назад
Thank you so much for this video. Spent whole night to find this kind of a tutorial and only found it in the morning XD.
@JackyTran
@JackyTran 3 года назад
This tutorial is so much better than the one Unity gives, thank you
@FlexFoundry
@FlexFoundry 3 года назад
Thank you so much for your tutorials! Really helpful and straight forward
@tamerxero
@tamerxero 3 года назад
Hey, you are an amazing content creator! I've been trying to figure out how to get cinemachine working with the new input system for like 2 months, but I'm a coding newb, so it was all in vain until this video! I'm so excited to implement this into my main project. Unfortunately, Unity Remote 5 doesn't really work with my phone (some kinda bug that prevents it from recognizing input), so the touch controls didn't work, but because you were so descriptive, and explained everything so well (without being condescending, thank you!!) I was able to work out most of my problems! And then you gave a solution to make the player follow the camera! No way!! I'm so thrilled my eyes are bulging out my head, thank you!!
@samyam
@samyam 3 года назад
No problem! Glad you enjoyed the content. And it isn't your phone Unity Remote 5 isn't really compatible with the input system so you would have to build it to test it on your phone. Feel free to join my discord if you have any questions discord.gg/SwCKB3Q 🙂
@andreicristian7845
@andreicristian7845 3 года назад
Oh God I was struggling with the player movement for days, thank you
@januelpayumo1998
@januelpayumo1998 2 года назад
OMG FINALLY been searching for someone who makes 3rd person camera with joystick movement T-T you have literally saved my project
@samyam
@samyam 2 года назад
Thank you! I have another video on third person controller if that helps (non-joystick): ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ImuCx_XVaEQ.html
@trys10studios65
@trys10studios65 3 года назад
Thanks for the video! I was used to the CrossPlatformManager class of old lol, thank you again, incredibly informative and straight to the point.
@ryanyoung9355
@ryanyoung9355 3 года назад
Your tutorials are phenomenal! Thank you so much!
@samyam
@samyam 3 года назад
Thank you!
@sigibiby7567
@sigibiby7567 3 года назад
Thanks a lot. This is exactly what i wanted. I searched for it a lot. Noy YT recommended this for me.
@EsperG2
@EsperG2 3 года назад
Thank u so much! I had so much trouble with cinemachine but you really helped ^^
@Bruce.B
@Bruce.B 4 года назад
Lovely tutorial. Thank you ❤️ I will use this for sure
@mehmetkoman8217
@mehmetkoman8217 Год назад
Thank you samyam.
@theman3282
@theman3282 2 года назад
thanks samyam, your tuts by far the most pleasing to hear...
@samyam
@samyam 2 года назад
i’ll keep ‘em coming! :)
@amar6055
@amar6055 3 года назад
Amazing tutorial. Loved it!
@ImranSuhaimix
@ImranSuhaimix 2 года назад
thank you! I almost give up doing my game project and then you saved me!! thankss
@sugy9310
@sugy9310 3 года назад
This tutorial made my life happy very very very very thankful for you
@ByChris
@ByChris 3 года назад
Muchas gracias! thanks a lot! i was just needing this!
@agerausten6630
@agerausten6630 3 года назад
That was cool samyam. You rock
@nubie_creation
@nubie_creation 2 года назад
Very very helpful. Its been a month to search tutorial like this..
@karthikvbhat2054
@karthikvbhat2054 3 года назад
okay now this is the best content and the content i was searching so thank you
@samyam
@samyam 3 года назад
Thank you!
@funduino8322
@funduino8322 3 года назад
thank you so mych, this was very helpful in my project
@vinimaykaul
@vinimaykaul 4 года назад
Thanks a lot. Was just looking for Joystick control with New Input System. Very well explained.
@samyam
@samyam 4 года назад
Glad you enjoyed!
@syedsadiq8631
@syedsadiq8631 3 года назад
@@samyam thanks but iam doing for spear it is not rolling it slideing and screen is jumping and strucking plz help me
@samyam
@samyam 3 года назад
I’m not sure what you mean
@syedsadiq8631
@syedsadiq8631 3 года назад
@@samyam iam take spear as a player . I not take capsule as player . When I move with joystick ball is sliding around but not rolling .
@samyam
@samyam 3 года назад
I suggest looking at Unity’s Roll a Ball tutorial for rolling a ball here learn.unity.com/project/roll-a-ball
@dushes_botalov
@dushes_botalov 3 года назад
Great tutorial, thank you!
@carlabalos3884
@carlabalos3884 Год назад
Thank you very much!
@mouradeid5457
@mouradeid5457 3 года назад
this video is damn awesome, thank you so much
@dgamedesigner
@dgamedesigner Год назад
Thanks a lot Samyam. Helped me a lot by simplifying stuff. Although I was using my own custom camera but thinking to use cinemachine.
@immigueljoie08
@immigueljoie08 7 месяцев назад
u saved my life, wahhhhhhh! much love!
@runrajrun
@runrajrun Год назад
Thanks a ton! :D
@furk4n446
@furk4n446 3 года назад
Thank you very much, it worked very well for my mobile game, I like you :) I hope your youtube channel will improve
@kenneth2hip
@kenneth2hip 3 года назад
This new input system is amazing! I'd like to credit you once my game is finished uwu
@samyam
@samyam 3 года назад
Aw thanks!!
@huseyinturgut1988
@huseyinturgut1988 2 года назад
Thank you for video! Very helpful.
@nikunjsaraf5150
@nikunjsaraf5150 3 года назад
Best Tutorial Ever!!!!!!!!!! Thanks a lot for this!!!!!
@physicsstudent451
@physicsstudent451 3 года назад
Thank you Genius person this helped me with my game.
@everythingonit3159
@everythingonit3159 2 года назад
Thank you for this video, it is very helpful.
@MaximSiamenau
@MaximSiamenau Год назад
I love you! I lost my whole day and only you helped me.
@harshaljadhav7935
@harshaljadhav7935 2 года назад
Truly amazing and very helpful!
@samyam
@samyam 2 года назад
Thanks!
@wibihartanto7084
@wibihartanto7084 2 года назад
Thank you this help me so much!
@blogigrodela
@blogigrodela 3 года назад
Thanks for great tutorial
@captain_fact
@captain_fact 2 года назад
Amazing video. I totally understand now all thanks to you
@samyam
@samyam 2 года назад
Thank you!
@naxovr
@naxovr 3 года назад
Thank you very much for sharing your knowledge. I subscribe to your channel. Keep it up. Congratulations!
@Leandero
@Leandero 3 года назад
Hi! I loved your tutorial
@Jimaniki
@Jimaniki 2 года назад
Thanks a lot ! You do a great job !
@samyam
@samyam 2 года назад
Thanks!!
@dixlanbarrios2377
@dixlanbarrios2377 3 года назад
I love it!!!!! it's so useful!!!!!
@franciscoariellararosales8654
@franciscoariellararosales8654 3 года назад
You are good as can get, thanks a lot
@karthikeyubusa5630
@karthikeyubusa5630 3 года назад
Wonderful. Thanks a lot. :)
@cartofsrl9589
@cartofsrl9589 3 года назад
Really you are the best thank you!
@taharvingames
@taharvingames 3 года назад
I can't understand those 9 peoples who disliked this awesome tutorial. Thank u so much!!!!
@ramases997
@ramases997 3 года назад
Probably a misclick tbh lol
@glitx2273
@glitx2273 10 месяцев назад
THANK YOUUUUUUUUUUUU SO MUCH
@tattoosclub23
@tattoosclub23 3 года назад
THANK U SOW MUCH U ARE THE BEST!!!
@hamzzashaffi
@hamzzashaffi 3 года назад
Super cool! Thanks!
@hamzzashaffi
@hamzzashaffi 2 года назад
Thanks again! :))
@samyam
@samyam 2 года назад
Thanks for watching 😄
@hamzzashaffi
@hamzzashaffi 2 года назад
@@samyam :))
@richardpavlikan8038
@richardpavlikan8038 3 года назад
Thank you! First time making a 3D game, and I could not find any tutorial that would help me. AMAZING!
@kozmobotgames
@kozmobotgames Год назад
Oh, that looks exactly what I made. The capsule guy with a small cube is my favourite educational character. I also make game dev tutorials and videos and my videos perform fine.
@imteajsaimun4134
@imteajsaimun4134 3 года назад
You are great!!!
@untemi0
@untemi0 3 года назад
thank you so mush
@basilgomaa711
@basilgomaa711 3 года назад
I like that !
@flaviokonti5522
@flaviokonti5522 3 года назад
Awesome tutorial thanks. Btw I think your Euler pronounciation was correct
@CelestialSoul
@CelestialSoul 3 года назад
Great tutorial. I like your voice a lot.
@alexstankovic2947
@alexstankovic2947 2 года назад
Girl, u rock
@samyam
@samyam 2 года назад
Thanks! 🙂
@malibaturhan
@malibaturhan Год назад
Thanks!
@samyam
@samyam Год назад
Thank you so much for the donation!
@malibaturhan
@malibaturhan Год назад
@@samyam that's least I can do. better information than paid courses. I thank you
@GameManagerController
@GameManagerController 10 месяцев назад
Bless you
@akashjaiswar9437
@akashjaiswar9437 3 года назад
There are many videos showing player movement but this one is like the king of cross-platform and flexibility it has everything. Thank you so much for the video.
@josephseed9270
@josephseed9270 3 года назад
AMOGUS nice video btw
@aroldo1959
@aroldo1959 2 года назад
Samyam, nice work on this lecture. I tried using the new Input System on iOS but the On-Screen Stick, was not responsive using the Player Input and OnMove and OnFire (Send Messages Behaviour. Now that I got you test working. I will apply to my game. I sent some support! :) By The way , I am using Unity HUB V3.0.1 and Unity Editor 2021.2.7f1
@ccxvee
@ccxvee 2 года назад
life saver
@musicgalatas911
@musicgalatas911 3 года назад
You are the best
@thedarck777
@thedarck777 3 года назад
Se ve bueno :o Lastima que yo solo entiendo español Pero volveré a ver el video otro día Pero creo .. que aprendí lo que yo quería Apartar los movimiento de la camara🎥 de mi joystick 🕹 :) 👍🏻🙂 gracia Unico video
@samyam
@samyam 3 года назад
Que bueno, dejame saber si tienes preguntas!
@paulcrawley312
@paulcrawley312 2 года назад
Sometimes the jump button won't except the jump trigger, here's the fix change: groundedPlayer = controller.isGrounded; if ( groundedPlayer && playerVelocity.y < 0 ) { playerVelocity.y = 0f; } to groundedPlayer = controller.isGrounded; if ( groundedPlayer && playerVelocity.y < 0 ) { playerVelocity.y = -0.5f; // this makes sure controller.isGrounded is triggered } Keep up the great work Sam
@samyam
@samyam 2 года назад
Thanks! Also make sure the min move distance in the character controller is 0 that can sometimes cause problems if it is not
@sexypotato
@sexypotato 3 года назад
Cool!
@phontum
@phontum 11 месяцев назад
This is pretty weird, but for those who use Unity Remote to test things out for your mobile app, please keep in mind that the New Input System is not supported in Remote yet (it's been 3 years already :/ ). To test your controls. you will need to actually build the app. I found this after 3 hours "fixing" my game...
@kzzhk
@kzzhk 6 месяцев назад
omg tysm😭😭😭 kept wondering what was wrong with my game
@shaikhabdulbasit5717
@shaikhabdulbasit5717 2 года назад
00:00 - Intro 00:43 Pre-Start 03:13 Warnings 04:16 GUI left joystick 06:10 GUI right joystick 06:43 Action Map 07:32 LS binding and overriding for touch 07:56 WASD keys 08:21 Jump 08:31 RS binding 08:57 On-Screen Control Mapping 09:13 Script explaining 10:34 Binding On-Screen
@shaikhabdulbasit5717
@shaikhabdulbasit5717 2 года назад
The RS ON Screen binding is somewhere between 11:00 and 12:30
@darkdoom907
@darkdoom907 2 года назад
18:15, starting with cameraLook script
@memelord583
@memelord583 4 года назад
Nice
@joelchala.
@joelchala. 3 года назад
lo dificil que es para alguien que no entiende el idioma, aunque al final me funciono; gracias.
@samyam
@samyam 3 года назад
Dejame saber si tienes preguntas, tenemos un Discord (yo hablo español) discord.gg/SwCKB3Q
@joelchala.
@joelchala. 3 года назад
@@samyam estoy verificando los comentarios y atraves de las respuesta que le das a ello eh logrado solucionar unas que otras cosas. gracias
@luisalbertoherrera5439
@luisalbertoherrera5439 3 года назад
Hey! good tutorial! I have learned a lot with this video :) can you make a second part adding additional buttons for actions like shooting? Thanks :)
@samyam
@samyam 3 года назад
I'll put it on my list for a possible future video!
@luisalbertoherrera5439
@luisalbertoherrera5439 3 года назад
@@samyam Thank you! :)
@kebalbadal4224
@kebalbadal4224 2 года назад
made my task lot easier
@oneforall38
@oneforall38 8 месяцев назад
Am getting error the type or Namespace name player could not be found are you missing a using directive or an assembly reference can you help?
@honokiii
@honokiii Год назад
I didn't know this OnScreen classes! wow! less work for me, thanks!
@Eriffe
@Eriffe 3 года назад
Great tutorial, thanks for sharing! I spent a lot of time to sort this out. I tried to run on my phone but the joystick doesn't work. (It works on Unity using the mouse and the simulator). The buttons work fine. Any thoughts what could be causing this?
@samyam
@samyam 3 года назад
Are you running it in Remote? The remote app isn't completely compatible with the new input system. We also have a Discord channel where you can ask in the help channel if that doesn't work discord.gg/bvQEGk7
@user-rb5xr9sj8n
@user-rb5xr9sj8n 3 года назад
Thank you, could you also provide a pinch zoom tutorial for the CineMachine Camera?
@samyam
@samyam 3 года назад
It’s on my list! In the meanwhile I have a zoom tutorial for cinemachine (desktop) ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-PsAbHoB85hM.html
@brian.g.716
@brian.g.716 3 года назад
Ok so I went thru this tutorial, 3rd person cinemachine controller, and your mobile swipe tutorial. However I just can't process how to take those swipe controls and apply them to the camera. I like your setup in this video, however, in mobile games, I feel a swipe camera would work better for me. Right now, your touch pad acts like a joystick and if you move and then hold it, it keeps spinning. Much like an analog controller. Anyway you can make a quick tutorial on creating a swipe camera? I'll pay you lol. Thank you!! 😊🤗
@samyam
@samyam 3 года назад
I already have my next video recorded, but I’ll put it on my list for a potential video. On the other hand the swipe would work similar to this implementation. They are both Vector2s that measure the delta of the current - previous position. So you can just pipe those values to cinemachine instead of the joystick one.
@laurence8528
@laurence8528 Год назад
Thanks for the detailed tutorial... btw, why does the Joystick (left Gamepad) only works on deployed Apk but not on Unity Remote 5?
@samyam
@samyam Год назад
Input System does not work with Unity Remote
@alekjwrgnwekfgn
@alekjwrgnwekfgn 2 года назад
I think if you did an extension of this video with the new Unity 3rd person controller you would get a lot of views and a lot of 💕
@anonymoussloth6687
@anonymoussloth6687 3 года назад
In your new input system videos, u choose pass through instead of value. What is the difference? I tried to read up on it in their docs and it said something about disambiguation but i didn't understand
@samyam
@samyam 3 года назад
I explain the difference here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-yRI44aYLDQs.html Although I mostly use passthrough since Value has been a bit buggy for me, theres not much difference for general used
@ezzblenderem
@ezzblenderem Год назад
The extension does not appear in the top bar of the program ؟
@CasaSoy
@CasaSoy Год назад
Great video(s)! How would I use this with UI Toolkit, either by using UI Toolkit exclusively or the two systems simultaneously. I'm stuck.
@shazeerrra
@shazeerrra 2 месяца назад
Hi ! I have select characters features for my games. Did this tutorial can do for both of my characters since you only show movement for 1 player. Thanks!
@iqiamir
@iqiamir 2 года назад
my iphone can’t detect the touch when i connect it with unity, is there something i should change?
@ajayprasad6218
@ajayprasad6218 3 года назад
im having error with the code Assets\Joystick Pack\Scripts\playercontroller.cs(18,13): error CS0246: The type or namespace name 'Player' could not be found (are you missing a using directive or an assembly reference?
@samyam
@samyam 3 года назад
Try regenerating the script again (make sure the class and file name are the same), that sometimes fixes the issue.
@danixadem
@danixadem 2 года назад
11:56 Actually if I'm not missing out some other techinal detail, we definetely need "image" component. Because it's catching the raycast (if raycast target box is selected) and working as a collider for click interaction on UI. I couldn't find any other way around it, if there is please let me know.
@samyam
@samyam 2 года назад
Yes you are correct I seem to have misspoken, my bad.
@astralstormgamestudios1259
@astralstormgamestudios1259 Год назад
Im trying to make the Unity 3D Game Kit work with this new input system... But Im stuck... the old ones is like m_Jump = Input.GetButton("Jump"); And I made public void OnJump() { m_Jump = True; } But he jumps only once? ... help?
@XEQUTE
@XEQUTE 2 года назад
Why do say that you have made several videos of input system lol, I think I have yet to find a video where you say " this is my first time explaining the new input system " !. NVM binding your channel to get my top down shmup controller to work. I tried it with the swipe system . It didn't go so well. its just too long! but this might work but I cannot fit a fire and a joystick button on a portrait screen so i might as well keep it firing all the time and allow the use to focus on movement. any suggestions? @samyan?
@ashdev
@ashdev 3 года назад
Having a problem with jump its not jumping properly just make groundedPlayer bool to public and see its fluctuating. How to fix this
@samyam
@samyam 3 года назад
Make sure you are calling character controller move twice in a frame (one for horizontal and one for vertical velocity). And make sure you are adding gravity of every frame. Also you can try putting it in Fixed Update instead. Character Controller is a bit tricky but here's a forum with some other possible fixes: forum.unity.com/threads/controller-isgrounded-doesnt-work-reliably.91436/
@anonymoussloth6687
@anonymoussloth6687 3 года назад
In terms of performance (especially for games in mobile) is it better to use Character controller or the normal RigidBody approach?
@samyam
@samyam 3 года назад
Character Controller since it moves without using "actual" physics. For platformers they also impact collision and how accurate it is (character controller or custom raycast controller is generally used for platformers)
@neozoid7009
@neozoid7009 Год назад
Hey Samyam the tutorial is super awesome and very helpful but my onscreen stick is not working .. when I move the onscreen stick the moveInput vector don't change at all it stays at vector2(0,0). please help why this is happening.
@arsil_
@arsil_ 3 года назад
super useful video 🔥 but how do i make change to the camera looks using a swipe on some area (instead another on stick button) while dragging an onstick for movement ? i cant implement the multi touch thing, except i manually assigned touch#0 for movement and touch#1 for camera looks xD
@samyam
@samyam 3 года назад
I have a video on detecting swipe movement here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-XUx_QlJpd0M.html
Далее
Use Unity's Input System Like a Pro
24:48
Просмотров 25 тыс.
How to use Unity's Input System
31:47
Просмотров 143 тыс.
Mobile Controls in Unity: The Ultimate (2023) Guide
8:19
How to use TOUCH with the NEW Input System in Unity
24:11
choosing a game engine is easy, actually
15:08
Просмотров 333 тыс.
Easy Joystick for Mobile with Input System in Unity
7:41
Why these weird indie games BEAT the AAA industry
9:08
ТРЕШ КОНСУЛЬТАНТ 😱
0:11
Просмотров 1 млн
10 июля 2024 г.
0:34
Просмотров 1,3 млн