Easy Joystick for Mobile with Input System in Unity

Поділитися
Вставка
  • Опубліковано 28 лис 2024

КОМЕНТАРІ • 320

  • @aliakbarshabab-u1l
    @aliakbarshabab-u1l Рік тому

    Come on man... I works 3 weeks on this this and finally I finish that here
    🥳❤❤❤❤❤ thanx alot

  • @subzerocatalyst
    @subzerocatalyst 2 роки тому

    first person with a twitter user pfp that is actually helpful and doesnt make people wanna die, cool.

  • @ShinichiKudoQatnip
    @ShinichiKudoQatnip 3 роки тому

    Where were you all my life? The best and easiest movement tutorial ever!!!!!!!!!!!!!!!!!

  • @eliorubenmc
    @eliorubenmc 2 роки тому

    So easy, so nice! I love the voice of this woman! thanks!

  • @DanielAbonales
    @DanielAbonales 3 роки тому +7

    This tutorial deserve thousands of subs thanks sam

  • @filippobiancone1998
    @filippobiancone1998 Рік тому

    I have been looking for a simple solution for all of yesterday. I'm so happy I found your video

  • @iSnakeBuzz
    @iSnakeBuzz 3 роки тому +4

    Hmmm I've subscribed because yesterday I've found a really good video on your channel and today looking for some information about this I found your channel again. So thank you again xDD

    • @samyam
      @samyam  3 роки тому

      Woot woot! Thanks 😄

    • @chakibchemso
      @chakibchemso 2 роки тому

      She can read yo mind buddy decades later i needed this too nice

    • @grandprime2014
      @grandprime2014 Рік тому

      ​@@samyam make video how to do it with 2d

    • @Ez-_-69.
      @Ez-_-69. Рік тому

      ​@@grandprime2014 it's same

    • @Ez-_-69.
      @Ez-_-69. Рік тому

      ​@@grandprime2014 use button for 2D though if it's top down joy stick is better and all the process is same

  • @neilfosteronly
    @neilfosteronly 2 роки тому +3

    Vector 2 to Vector 3 I was not sure how to do at first. Some may see that up on controller will use y for your rigid body. To have it use Z instead look at line 44 at 4:42 in the video. You need to have a new Vector 3 set to your (vector2.x, 0, vector2,y). Now your movement will work correct instead of up going up compared to the plane.

  • @creepermods4641
    @creepermods4641 Рік тому +1

    The anchor presets is not working properly.
    Oh i was just dumb, i didn't read the Alt+Shift.

  • @SeriousMoFo
    @SeriousMoFo 7 місяців тому +1

    I have a problem with this, in the video it seems like when you set it up it works fine with both mouse inputs and phone touch inputs. I tried it myself with my mouse and then with unity remote for my phone(iphone and android tablet) it allows me to move the UI joystick but not the player for some reason

  • @Daniel14Mejia
    @Daniel14Mejia 3 роки тому +5

    InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
    If you ever get this error just go to project settings> Plater> other settings> active input handling> and change it to BOTH

    • @samyam
      @samyam  3 роки тому +2

      Yeah that means you are using the old one somewhere, which I suggest not using both unless you have no choice (maybe a package you are using uses the old one). That may be the Event System using the old system, but it's hard to say without seeing the project.

  • @ThePascalbriand
    @ThePascalbriand Рік тому

    Really like your channel. Good job

  • @keatonrozema5787
    @keatonrozema5787 2 роки тому

    After over a half hour, got it to work, thanks

  • @ricniclas
    @ricniclas 2 роки тому +2

    Thank you a lot for those tutorials! You really have been helping my to understand how the new input system works

  • @Josue-Arreaga
    @Josue-Arreaga 2 роки тому +3

    I am a bit confused, when did you set up your player/animations? is this a second part of a video? Could you direct me to the video if so.

  • @Jason-ph8pf
    @Jason-ph8pf 3 роки тому +22

    Thanks! I love the content you are providing. FWIW I had one small problem. I noticed that the UI image wasn't moving around for me (see about 1:30 in the video). I fixed this problem by going into my EventSystem game object and changing from "Stand Alone Input Module" to the new InputSystemUIInputModule. If anyone else has a similar problem you may have a similar issue.

    • @samyam
      @samyam  3 роки тому +1

      Thank you! :)

    • @blipblub2419
      @blipblub2419 3 роки тому

      thanks

    • @brianmcalpine822
      @brianmcalpine822 2 роки тому

      Hi Jason, I've changed to InputSystemUIInputModule in the event system but I still have this issue. The WASD controls move me but the joystick image doesn't move and therefore won't move on Android :( Any ideas?

    • @brianmcalpine822
      @brianmcalpine822 2 роки тому +2

      Update: I had added the PlayerControls Input Actions asset to the event system, after reverting and using defaults it now works as this brilliant video shows

    • @stevevokhe
      @stevevokhe 2 роки тому

      This man is the mvp right here

  • @СергейКоваленко-п2я
    @СергейКоваленко-п2я 11 місяців тому

    Simple and comprehensible. Thanks)

  • @Diertstarr
    @Diertstarr Рік тому

    Thanks for the tutorial - this Unity input is so convoluted. Godot FTW!

  • @Jullo96
    @Jullo96 11 місяців тому

    Thanks a lot, lots of useful info and good practice tips here

  • @benbechia3582
    @benbechia3582 3 роки тому

    Thanks why are you so extremely underated

    • @samyam
      @samyam  3 роки тому

      Thank you! :)

  • @Alexim0n
    @Alexim0n 4 місяці тому

    This is such a life saver, tysm!!!!

  • @Maxchallenger458
    @Maxchallenger458 2 роки тому

    Thanks Sis Love your Work, it helped me a lot and saved my day. best of LUCK

  • @NostalgiaNote
    @NostalgiaNote 8 місяців тому

    If someone runs into a problem like not working in the next scene, plz remember to put that EventSystem object under your UI_Canvans, which has a Singleton generic set up already.

  • @espiritualidadedesvendada
    @espiritualidadedesvendada 3 роки тому +3

    It's Really Helpful!!! thank you for making it easy and simple to understand!!

    • @samyam
      @samyam  3 роки тому +1

      Awesome!

  • @phantomBlurrrr
    @phantomBlurrrr Рік тому

    Is there a way to "transfer" your "touch" from one button to another? I am trying to do as follows: There is "one" joystick on screen. But before it is running its joystick logic, you have to hold it for a second. The way it is setup is there is a regular "on screen button", behind this button is an image (circular slider), and behind the slider is the joystick. So what happens is you can tap the button and your tap will not be detected by the joystick (since the button is on top of it). This is fine, because the button can be the one that runs the slider (if you hold the button, the slider fills up over time, and if you release it, then the slider empties over time). If the slider becomes completely empty, it disappears. If the slider is FULL then the button AND the slider disappear. Now the joystick is available since the button and the slider, which were on top, have disappeared.
    Now the issue is that your touch input, which is what you used to tap and hold the button, isn't being detected by the joystick. You have to release your original touch and then touch again, this time the joystick is directly touchable since the button and slider are gone.
    So a solution would be for the joystick to detect touch if you DO NOT drag, so that the player can hold the joystick, which at the moment, IsPressed(), started, performed are NOT firing until you start dragging (so it doesn't look like it can be used to run the button's code, which is expecting the player to hold the button).
    Another solution would be to somehow transfer the original touch from the button to the joystick. That way when the button and slider disappear, the joystick takes over that touch input.
    Any clue how to do this? The idea is to have the player hold the joystick for like 2 seconds before the joystick becomes enabled. To give the player visual feedback, I added a circle slider which when full makes the joystick usable. So far, I have a button that runs the "touch and hold" logic (and slider). But once the "hold" action is complete, my joystick isn't detecting the input until the user released the original touch input and re-touches the joystick.
    It's setup as button in the front, slider behind it, joystick behind all that. That way, as the button and slider are enabled/disabled, the user can't tell (since they're using the same image asset).

  • @tetras699
    @tetras699 Рік тому

    thank you
    Unity input system is good!
    i'm made high quality controller !

  • @menesekinci
    @menesekinci Рік тому +7

    Whenever I open a tutorial video. The trainers ask us to watch 250 videos they shot by saying "Yes, I showed this, I told you about it, you already know that". Just to watch and understand one video. This makes it even more complicated. I really don't understand why you are doing this.

    • @CadaverKuma
      @CadaverKuma 7 місяців тому +1

      Dawg its really not that hard

    • @haribodriving5951
      @haribodriving5951 6 місяців тому +2

      They make content. You are watching this for free to learn something. It's like 5 minutes long. This video doesn't show complete system cause it doesn't need to. Soooo go watch the other video that is also free and stop thinking the world is going to hand you everything in life.

  • @umairjamshaid2173
    @umairjamshaid2173 Рік тому

    Thank you so much! You're a legend

  • @mgames1984
    @mgames1984 2 роки тому +4

    Sensacional o video, extremamente organizado e direto ao ponto! Parabens!

    • @lucaslimagamedeveloper6787
      @lucaslimagamedeveloper6787 2 роки тому

      Eu também achei, consegui implementar facilmente. Porém eu só queria uma função, onde eu tocasse, o joystick acompanhasse... Mas assim já está de bom tamanho.

  • @smbiplob9476
    @smbiplob9476 2 роки тому

    Thank you a lot for those tutorials!

  • @legendarywolf2372
    @legendarywolf2372 2 роки тому +1

    this is amazing , but how to replace left stick with full screen touchpad ?

  • @yaelglor
    @yaelglor 2 місяці тому

    So, I already added a keyboard and mouse controls with this input system and they work just fine. I wanted to add mobile support, so I used this tutorial and added a control scheme with the controls exactly how you showed. However, even in simulator screen, I can move the UI images with the mouse but the player doesnt move at all. I have no idea why?

  • @adudewithglasses9449
    @adudewithglasses9449 Рік тому

    At 1:53 you choose Gamepad instead of Joystick even though this is a tutorial about adding a joystick control. Is there a reason why? After you clicked Gamepad you then clicked Left Stick. If you click Joystick it's basically the same except it just says Stick. Are the Left and Right Sticks in Gamepad different from the Stick in Joystick? Or are they the same? I'm probably just overthinking this so sorry if this is an unnecessary question. And thank you for this tutorial!

  • @sergiovega3115
    @sergiovega3115 2 роки тому

    Gracias, te amo ❤, nadie fue tan claro como tu.

  • @TYNEPUNK
    @TYNEPUNK 10 місяців тому

    Thanks, but for some reason it wont move for me. I ALWAYS have trouble setting up input on a new project :(

  • @s4shrish
    @s4shrish 3 роки тому

    Daaaamn, this channel is solid. Subbbbbed!

    • @samyam
      @samyam  3 роки тому

      Thanks 😄

  • @diyvideos8836
    @diyvideos8836 2 роки тому +1

    first of all thanks for the video. I have a question for you. Why does the joystick that I add in my Canvas not move in the editor or mobile device? where am i doing wrong?

  • @kozavr
    @kozavr Рік тому

    great tutorial

  • @Djkatchietsnouvastudio
    @Djkatchietsnouvastudio Рік тому

    Madzam you finished the video b4 linking the continuation of the video where you put the codezzzzz... assume its a totally new viewer accessing this video randomly

  • @philipkaltsounis8097
    @philipkaltsounis8097 3 роки тому

    awesome video! I'm trying to learn the new Input System and your videos certainly help

  • @antisony2008
    @antisony2008 2 роки тому

    omg so pro, I wish I were at your level

    • @samyam
      @samyam  2 роки тому

      practice makes perfect :)

  • @freeformcreations
    @freeformcreations 2 роки тому

    Well done!

  • @hwanginYouppa
    @hwanginYouppa 8 місяців тому

    If I want to make it work on a mobile should I still keep it as gamepad left joystick?

  • @woodenfences
    @woodenfences 3 роки тому

    Succinct. Useful. Inspiring. Thank you!

    • @samyam
      @samyam  3 роки тому +1

      Thanks for the nice words! 😄

  • @SecondJob
    @SecondJob 2 роки тому

    NO.
    It goes well with a console controller, but it does not go with the SmarthPhone

  • @jhgfghjfuzrtfchchghgf
    @jhgfghjfuzrtfchchghgf Рік тому

    Does this work for anyone? I feel completely lost. I did what she did, but nothing moves. Trying to follow this video for over half an hour, but no success. It's sad that 20% of the video is about selecting an image instead of how to get this working properly

  • @gamedevelopmentwithunity2050
    @gamedevelopmentwithunity2050 2 роки тому

    Very helpful I subscribed 💝💖

    • @samyam
      @samyam  2 роки тому

      Thank you!

  • @nelsonjimenez9068
    @nelsonjimenez9068 Рік тому +1

    Me gustó el video ❤

  • @a.u.3371
    @a.u.3371 3 роки тому +3

    I made a game with wasd controls, and now i want to make a mobile version of it, though its gonna take forever to remake everything for mobile, so is their an easy way to change it in the same script maybe?
    Edit: I forgot to mention that I dont want joysticks, instead id like arrow buttons. is there a way for a button to receive the same input message as a keyboard arrow? like make the button on screen behave like the one on the keyboard?

    • @samyam
      @samyam  3 роки тому +1

      The input system is designed to be easy to adapt for different consoles. What you can do is have 4 on screen buttons and each one overrides the control that you currently have bound, for example have one button override the up arrow key or W. It should “act” as those values and you shouldn’t need to change much in the code. Let me know if that helps!

    • @a.u.3371
      @a.u.3371 3 роки тому

      @@samyam yeah thats what I want, but I cant find a way to make it real, u have a tutorial on ur channel that might help with UI and buttons n stuff?

    • @samyam
      @samyam  3 роки тому +1

      Yeah I have some videos on using the UI with the new system, although I don’t have a dedicated video of on screen buttons
      Enable UI with the new system ua-cam.com/video/TBcfhJoCVQo/v-deo.html
      Controller and Keyboard Menu Navigation
      ua-cam.com/video/Hn804Wgr3KE/v-deo.html
      Joystick ua-cam.com/video/zd75Jq37R60/v-deo.html
      ^ Concept should be similar as in the joystick video but use on screen button instead

    • @a.u.3371
      @a.u.3371 3 роки тому

      @@samyam aight thx for ur time, ill check em all out.

  • @SAL73VFX
    @SAL73VFX 2 роки тому +2

    Is there a tutorial of yours where you explain step by step how to code the character script instead just to copy from the documentation? thanks for the tutorial. :D

  • @Joe-oq2zn
    @Joe-oq2zn 2 роки тому +1

    Hi Sam, after implementing the UI and hit play, I can't drag the image around and move the joy stick. Any idea what's happening?

    • @mairinger80
      @mairinger80 2 роки тому +1

      see earlier comment: I noticed that the UI image wasn't moving around for me (see about 1:30 in the video). I fixed this problem by going into my EventSystem game object and changing from "Stand Alone Input Module" to the new InputSystemUIInputModule. If anyone else has a similar problem you may have a similar issue.

  • @kingoffuture2000
    @kingoffuture2000 Рік тому

    i don't have any unity registry or input system in the package manager in Unity 2019.3.11f1 (64-bit) version

  • @myk3l9675
    @myk3l9675 3 роки тому

    Awesome, thanks!

  • @wolfplaysgames8937
    @wolfplaysgames8937 3 роки тому +2

    great video! is there a tutorial for how to make the camera just be controlled by swiping on the screen (like minecraft does it)? thanks so much
    edit: forgot to mention first person as well

    • @samyam
      @samyam  3 роки тому

      Yeah! The video is a little older but I did a third person video of that
      ua-cam.com/video/YV5KOZHsIz4/v-deo.html
      (Basically as a hack you can make the joystick invisible and place it over the are you want the player to swipe then pipe that input to your camera look)
      I have a separate first person controller video (without joystick)
      ua-cam.com/video/5n_hmqHdijM/v-deo.html
      And since then I found an easier way to replace the cinemachine old input system values (cinemachine input provider)
      ua-cam.com/video/we4CGmkPQ6Q/v-deo.html

    • @samyam
      @samyam  3 роки тому

      Ah I also have a swiping video that you can use instead of the joystick hack, and change it to your needs:
      ua-cam.com/video/XUx_QlJpd0M/v-deo.html

    • @wolfplaysgames8937
      @wolfplaysgames8937 3 роки тому

      @@samyam thank you for these however i am not having any luck. i wont go into why it doesnt work for me as its a somewhat long explaination, but to simplify it, it feels very unresponsive. rotating the camera based on the finger's position when the screen is first pressed compared to its current position would make it feel much better i think. however im not really sure how to go about doing that using the new input system, as i dont know how to get a constantly updating vector2 of the current position of the screen press

    • @samyam
      @samyam  3 роки тому

      When you start pressing, you can start a coroutine that checks every frame for the position and updates the camera accordingly:
      // pseudo code (sry on phone kinda messy)
      Coroutine c;
      OnStartTouch() {
      c = StartCoroutine(UpdateTouch)
      }
      OnEndTouch() {
      StopCoroutine(c)
      }
      IENumerator UpdateTouch() {
      while (true) { // or instead you can check if the finger is pressed and not have to do a StopCoroutine call
      vec2 v = get finger position
      camera.transform.position or rotation = finger position
      yield return null;
      }
      }

    • @wolfplaysgames8937
      @wolfplaysgames8937 3 роки тому

      @@samyam this worked great, but i do have a new problem. i can now only interact with my other buttons with right click. this might not be an issue as it could just be simulating a different finger, however i dont have the ability to export it to my phone right now to test. something that is definitely an issue is that when i interact with right click it still rotates the camera. how can i make the camera only rotate when being pressed off of the buttons? thank you for your help so far

  • @GameStylus
    @GameStylus 3 роки тому

    awesome, to the point

  • @x.4132
    @x.4132 3 роки тому

    I watched a few videos from you about movement and input. pretty good.
    but what about a video where you actually MOVE something?
    Couldn't find anyone.

    • @samyam
      @samyam  3 роки тому

      Thanks! I have a playlist on character controllers here
      Unity Character Controllers
      ua-cam.com/play/PLKUARkaoYQT2XKPI7Aj9NVOxcI5OlnuK8.html

  • @Someone-ln8vk
    @Someone-ln8vk 3 роки тому

    Great tutorial

  • @dcry1003
    @dcry1003 2 роки тому +1

    question how can i change the right joystick to look around to just use the right side of the screen so i can put another button there for lke jump or slide etc.
    (also how can i make the movement have exceleration? so the more you move character the faster it gets)

  • @LEARN-UNITY3D
    @LEARN-UNITY3D Рік тому

    Hello pls help . No video is helping in my game no joystick works

  • @ibarra309
    @ibarra309 2 роки тому

    I did a right click and drag on the soft roll, now if I click Play the position clock starts but my ti cursor does not move and I cant

  • @Jimaniki
    @Jimaniki 2 роки тому

    Thank you !

  • @gameopedia01
    @gameopedia01 2 роки тому +1

    Hi samyam, i got a problem with touch input. i followed your procedure and its working on some devices but not on all. it gives laggy output. Actually, its not working on my own phone but on other extra android devices that i have it is working fine. I want to know what could be the reason for this laggy output movement on using an on-screen stick. I have checked my phone's performance and touch inputs but nothing seems to be working. PLEASE HELP !!!!!!!!!!!!

    • @Schmiddi1004
      @Schmiddi1004 2 роки тому

      this is because of unity remote 5... im banging my heads against the wall too.
      apparently using Input System version 1.1.0-preview.3 works for some cases...
      just change the version number in ur manifest.json file

    • @rafaelskiarteportfolio1098
      @rafaelskiarteportfolio1098 2 роки тому

      I have the same issue! Did you find any solution?

    • @Dawiss2
      @Dawiss2 2 роки тому

      I had an issue with laggy joystick too, not sure if yours is same but I fixed it by moving my controls script at gameobject inspector above the rigidbody/collider.
      So probably the issue is because of priority of components, if physics components are first, the engine is doing physics calculations THEN doing what you have in your controls script, and it's the reason why it's laggy.

  • @ajithraj1206
    @ajithraj1206 3 роки тому +1

    I've a problem with the joystick..... Whenever I move a joystick (little bit) the speed of the player is slow but when I move joystick farther the speed is normal...I'm using 2D rootMotion.... Can you please help....

    • @samyam
      @samyam  3 роки тому

      That's normal, the joystick will give you smaller values if it's closer to the center. You can normalize the value manually or add a Normalize Processor to your action
      ua-cam.com/video/17VqOh3_zxU/v-deo.html

    • @ajithraj1206
      @ajithraj1206 3 роки тому

      @@samyam Thank you very much.

  • @TheNbc27
    @TheNbc27 2 роки тому

    I follow the video but I don't necassarily get the implementation into code. I am trying to use a joystick that essientially if held down (pass through i'm assuiming) triggers one function, if held up triggers another function... etc.

  • @mehmetakyuz5290
    @mehmetakyuz5290 3 роки тому +1

    Great video! I have a question though. How can I enable input detection just tapping anywhere on the screen but not only Canvas left-pad that we did in the video?

    • @samyam
      @samyam  3 роки тому +1

      Do you mean from anywhere in the screen move the joystick? You can make an invisible image covering the whole screen and attach the on screen joystick to it as a workaround, and then have a joystick image mimic the movement you are making on the invisible image for visual feedback. Is that what you mean?

    • @mehmetakyuz5290
      @mehmetakyuz5290 3 роки тому

      @@samyam That's exactly what I meant. I made image with alpha 0 full-sized, and its working like a charm, thanks a bunch! I should have thought about that :D

    • @samyam
      @samyam  3 роки тому +1

      Nice!! Yeah it’s a bit “hacky” but it works!

    • @TheKr0ckeR
      @TheKr0ckeR 3 роки тому

      @@mehmetakyuz5290 Hello, can you give a little bit detail how to achieve that?

  • @OpxGames
    @OpxGames 11 місяців тому

    everything is on a video that i have no idea where.... thanks

  • @DerClaudius
    @DerClaudius 3 роки тому

    Great, thanks!

  • @maxfun6797
    @maxfun6797 2 роки тому

    I have a problem when using this. Even when I'm not touching the joystick image, but when my click/touch is in the proximity, the joystick gets selected and moves. This interferes with other buttons that are near by.

  • @gilliantang5782
    @gilliantang5782 3 місяці тому

    not quite working for me, the joystick doesn't move after adding the on-screen stick component

    • @HowIsYourPc.123
      @HowIsYourPc.123 3 місяці тому

      I dont get the on screen component help me

  • @UntaggedAsync
    @UntaggedAsync 3 роки тому +3

    Me: creating joystick from scratch
    samyam: ...so all you need to do is add On-Screen Stick component
    after all this time ...

  • @Stinger-rq4gy
    @Stinger-rq4gy Рік тому

    Dear Samyam,
    Can you help me make floating joystick on mobile with the Unity Starter Assets FPS controller, I cannot get it working, I have been on this a looooooong time can you help me?

  • @chetansaini2843
    @chetansaini2843 2 роки тому

    i made the controls for pc and it does not work on android, what you told did not work,still thanks

  • @KBforJesusChrist
    @KBforJesusChrist Рік тому

    Can you make a video about mobile first person controller, I saw the one for pc but for mobile is not there

  • @geroncrisjulius
    @geroncrisjulius 3 роки тому +1

    I'm new to unity and was trying the to create an on-screen joystick using this tutorial. But I'm currently running to an issue where I cannot move the on-screen stick when testing on android. The stick can move when testing on windows. What should I check/setup in order to fix this?
    Edit: Tested the Input System samples (on screen controls and touch samples) but still experiencing the same issue.
    Using Input System v1.0.2 on Unity Editor 2020.3.11f1
    Thanks

    • @samyam
      @samyam  3 роки тому +1

      Try using Input System version 1.1.0-preview.3 (in the package manager, in the settings up at top, click advanced project settings and there will be an option to enable preview packages)
      forum.unity.com/threads/on-screen-joystick-sticking-on-android.1005158/

    • @geroncrisjulius
      @geroncrisjulius 3 роки тому

      @@samyam will try this, thanks

    • @geroncrisjulius
      @geroncrisjulius 3 роки тому +2

      After several testing, it seems that the problem is with the unity remote 5 and not with the input system as the controls work after building as an apk

    • @grzegorztarnowski3115
      @grzegorztarnowski3115 Рік тому

      @@geroncrisjulius Confirmed - It worked on APK file

  • @TheKr0ckeR
    @TheKr0ckeR 2 роки тому

    Thanks a lot! how would i deal with if our camera is top right or smth.

  • @nasimakhter3055
    @nasimakhter3055 8 місяців тому

    *tell me one thing maam, is this available for commercial purpose ?*

    • @samyam
      @samyam  8 місяців тому

      Yes it’s fine in any games or projects. but if you are taking the code from my patreon and distributing it as your own without any substancial changes then that’s not allowed.

  • @hrishikeshgarud7177
    @hrishikeshgarud7177 3 роки тому

    Nice. But I have one question. Does using old way ( get inputs from update()) gives less frame rate ?

    • @samyam
      @samyam  3 роки тому +1

      On the back end the input system has to run on every frame anyways to detect input so I wouldn’t think there would be much of a frame rate difference. You can run a quick profiler test using simple input to test it.

  • @turkaytandogan439
    @turkaytandogan439 2 роки тому

    float targetAngle = Mathf.Atan2(input.x, input.y) * Mathf.Rad2Deg + cameraTransform..... whats writing after miss ?

    • @Waffel136
      @Waffel136 Місяць тому

      same problem haha

  • @arcadehero1832
    @arcadehero1832 2 роки тому

    Good one Sam ;)

  • @carlabalos3884
    @carlabalos3884 2 роки тому

    Thanks!

  • @syedsadiq8631
    @syedsadiq8631 3 роки тому

    Can you make tutorial about joysticks with out using input system for 3rd person movement

    • @samyam
      @samyam  3 роки тому

      Hmm that’s not currently in my plans, I’m using the new system for most of my videos since that’s what unity will eventually one day switch to. But my videos shouldn’t be too hard to adapt to using the old system. Here is my third person video
      ua-cam.com/video/ImuCx_XVaEQ/v-deo.html

  • @LEARN-UNITY3D
    @LEARN-UNITY3D Рік тому

    joystick not showing in screen it only shows in game and not working

  • @Incomingson
    @Incomingson 2 роки тому

    And what about the speed sensitivy?

  • @hexd6205
    @hexd6205 2 роки тому

    why my Ui buttons not working when i press play

  •  3 роки тому

    Great video! Helped a lot. Thanks for it and keep going

  • @FlyRetroGamer
    @FlyRetroGamer 3 роки тому +1

    I have 4 errors while doing this, also I want to script the joystick, not by an asset.

    • @samyam
      @samyam  3 роки тому

      Well, what errors do you have? If you don’t want to use the On Screen Joystick that’s provided you can make your own. Or use the one Unity made in their new Starter Assets
      ua-cam.com/video/CD0FlqllfIE/v-deo.html

    • @FlyRetroGamer
      @FlyRetroGamer 3 роки тому

      @@samyam Thanks! Ive also discovered the ploblem, slince I've change the build settings to android, some of the computer controls where still there. Thats probably why.

  • @seraph1007
    @seraph1007 3 роки тому +4

    Hi, this video is great and helped out a lot. But I was wondering if there's a way to make the joystick more customizable. Before I switched to the new input actions I downloaded a free joystick asset pack and the controls on those feel better because of possibly lower dead zone and the fact that the center of the joystick can move according the finger's position.

    • @samyam
      @samyam  3 роки тому +2

      Yeah you can change the On Screen Joystick script to fit your needs (or make your own joystick and follow their example). The new starter assets from unity also has a Virtual Joystick script with different functionality
      ua-cam.com/video/CD0FlqllfIE/v-deo.html

  • @acikgozemre
    @acikgozemre 3 роки тому

    wow Thanks!

  • @CaliCG89
    @CaliCG89 Рік тому

    Can you move the camera and the joystick at the same time?

  • @Vozimeer
    @Vozimeer 2 роки тому

    Is this joystick counts only parameters from - 1 to 1, or it reads like 0.5f or 0.6f (Please sorry for my English)

    • @samyam
      @samyam  2 роки тому +1

      Counts from -1 to 1 and the numbers in between

  • @xSPESHERx
    @xSPESHERx Рік тому

    Hello, thank you for this nice video, but i have a question. Houw to make this controller for 2D platformer games using virtual buttons? I can't to finde some tutorial about it, because many tuts are with joystick. If it possible to make some video, would be great. Or maybe just help me.
    Because on Unity Editor virtual buttons works good, but when i make Build for testing on Mobile, there are some bugs (player do not move or moving with lottle steps after many tap on buttons)... Maybe some bad Interactions setting... I don't know... I stuck with this 🤷🏻

  • @Pavel-ju6xv
    @Pavel-ju6xv 3 роки тому

    Great tutorial but how to move camera around without using joystick?

    • @samyam
      @samyam  3 роки тому

      I have a third person controller video here without joystick:
      ua-cam.com/video/ImuCx_XVaEQ/v-deo.html

  • @elshowdelwendigopixeliento4345
    @elshowdelwendigopixeliento4345 2 роки тому

    Hi!, I'm using a game pad, and I have an issue. Maybe you can help :). My character has a blend-tree to manage the IDLE and move animations, and when I let the analog stick go back quickly to the center, the blend transition from run to IDLE go too fast. When I use keyboard this transition is OK. Any idea?.

    • @samyam
      @samyam  2 роки тому

      Try printing out the values from the analog stick to see what values are getting registered (or use the input debugger ua-cam.com/video/ICh1ZEaVUjc/v-deo.html)

  • @MrBegwell
    @MrBegwell 2 роки тому

    my project cannot support multi-touch. The 2nd touch affects the left stick.

    • @samyam
      @samyam  2 роки тому

      Try upgrading the Input System to the latest package

  • @BaconEggsRL
    @BaconEggsRL 3 роки тому

    How do you read the playerInput values from the PlayerController script? What is playerInput an instance of? The component is called "Player Input" but I can't find anything like that when I try to reference it in code

    • @samyam
      @samyam  3 роки тому +1

      You have to include the InputSystem namespace
      using UnityEngine.InputSystem;
      Then you can do:
      PlayerInput playerInput = GetComponent();
      InputAction moveAction = playerInput.actions["Move"];
      moveAction.ReadValue();
      as an example

    • @BaconEggsRL
      @BaconEggsRL 3 роки тому

      make sure your code is using UnityEngine.InputSystem;

  • @phoenixdeath6055
    @phoenixdeath6055 3 роки тому

    How do I undo everything because now all my code for player movements using the keyboard controls are not working.

    • @samyam
      @samyam  3 роки тому

      That shouldn’t impact your keyboard input if you added another binding under your Movement action. But you can just delete the gameobject you made with the Stick

  • @olexandrradchenko
    @olexandrradchenko 3 роки тому

    Amazing! Very helpful!

  • @Alex-On-VR
    @Alex-On-VR 2 роки тому

    thx

  • @MegaJHONDY
    @MegaJHONDY 2 роки тому +1

    is this working for 2d projects?

    • @samyam
      @samyam  2 роки тому +1

      Yes should work :) You can customize it to your use case as well

    • @MegaJHONDY
      @MegaJHONDY 2 роки тому +1

      @@samyam OK cool, thanks 😎👍

  • @TheHoecuspocus
    @TheHoecuspocus 3 роки тому

    Heya Samyam! Do you find you have issues with multitouch? I find I can press one whilst using the other... :/

    • @samyam
      @samyam  3 роки тому +1

      Yeah I’ve heard some people haven’t issues with that. Try setting in the Event System Module Pointer Behaviour to All Pointers As Is

    • @TheHoecuspocus
      @TheHoecuspocus 3 роки тому

      @@samyam thanks! Yeah I tried this! All of those 3 settings! I'll dig more. I was wondering if there were overriding settings at project level too maybe.

    • @samyam
      @samyam  3 роки тому

      So what happens when you use the second one exactly? Or you just can’t use the second one

    • @TheHoecuspocus
      @TheHoecuspocus 3 роки тому

      @@samyam it's like I can tap the jump button (a button instead of right stick) and it doesn't register unless I'm not using the left stick. It feels like the focus changes a bit like switching between inputs . But this is all on mobile

    • @samyam
      @samyam  3 роки тому +1

      Huh that is strange. Probably won’t work but try setting to passthrough for your action types you are using.