Simple Touch Controls in UNITY without any Code

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video I'm gonna show you how to wear touch controls in your game like this so yeah let's get started so here I'm using this environment from one of my previous projects and I have got this simple prayer character the described render rigidbody2d and a simple link animation and I'm also I did this movement the script and if you don't know how to create one you can just check out this video here alright so now let's just see how it looks like in the game that's it click and we can move around our player using the input from our keyboard but we want to move the player using D touch controls and for that that's like the D plan word first and we will open up the asset store using ctrl 9 so let's make them eyes this window here and here we are going to search for simple input and select the second one by Suleiman Yasser click on this and I've already downloaded this so I'm just gonna go ahead and click on import here and we will import pretty much everything so let's just go ahead and click import and once you've done this it will create this plugins folder for you and simple input inside of this go to the prefabs and here we have all sorts of touch controls but before using any of these we need canvas so let's create a canvas here alright so let's just put this in view like this and now is our player moves only in the horizontal direction we will use this arrows horizontal so let's drag and drop this inside of the canvas and it looks a bit tiny so let's scale this up for the width let's put in 304 the hide here we will put in 120 all right and now let's place this somewhere around here let's like both of these buttons and we will make them a bit transparent somewhere around here so that it doesn't block begin view one month we've done this we need to open up the air movement inside of the player so that's opened up the movement is four and if you don't know how to create one you can just stop this video here and copy all this code here alright the only thing we need to change here is this line of code so let's get rid of this and instead here we will type in simple input dot get X's and type in horizontal alright and now for the jump we will need to make another method here of the void and call this jump and inside of this jump we will just need to copy and paste this line of code here pestered here so yeah that's all we need to do here that says this and head back inside of unity and in here we need to make another button for the jump so let's go to our button and let me set this up quickly all right so I'll call this jump and also we will make this transparent just like the other ones or we can just end this right here and use this from this simple and put back and get rid of the transparency all right now we need to add an on-click event to this and drag and drop the player select the movement is curved and jump here all right and now we can just write this out awesome so now we are able to move the player with D touch controls and we can use them for of our Android devices right away so yeah everything's work just fine so let's exit play mode and if we open up our simple input prefabs folder and there are many more touch controls that we can use for different types of games I've already made a video on the steering wheel controls so if you want to check this out I'll put a link in the description and the only thing that you have to do is to use this simple input.getaxis values instead of the standard one alright so yeah that's it for this video if you have any questions leave them down in the comment section and subscribe to my youtube channel if you haven't already and you can support me on patreon I'll put a link to it in the description the next time see ya [Music]
Info
Channel: The Game Guy
Views: 31,323
Rating: undefined out of 5
Keywords: unity, unity game, unity game basics, unity beginners tutorial, unity beginners, bow and arrow 2d, projectile movement, trajectory in unity, shoot projectile, how to make game in unity, how to make 2d arrow, stop gameobjects from colliding, games in unity, Unity Touch controls, touch controls unity, unity simple mobile input, mobile input unity, touch input unity, brackeys, dani, touch control in unity, how to add touch control in unity, unity3d, unity tutorial
Id: BrHEKCxaFr8
Channel Id: undefined
Length: 6min 11sec (371 seconds)
Published: Sun May 03 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.