TOUCH CONTROLS in Unity!
Вставка
- Опубліковано 29 вер 2018
- Let's learn how to make touch controls in Unity!
GET UNITY PRO: on.unity.com/2N3FACS
● More on Unity Remote: bit.ly/2OehNon
● 2D Shooting: • 2D Shooting in Unity (...
❤️ Donate: www.paypal.com/donate/?hosted...
····················································································
► Join Discord: / discord
♥ Subscribe: bit.ly/1kMekJV
● Website: brackeys.com/
● Facebook: / brackeys
● Twitter: / brackeystweet
····················································································
► All content by Brackeys is 100% free. We believe that education should be available for everyone.
❤️ Donate: www.paypal.com/donate/?hosted...
····················································································
♪ "ES_Dress Code_Black - oomiee" by Epidemic Sound
4:31 ”after all you do have five fingers”
Me with ten fingers: confused screaming
haha
Same
I actually did this before reading the comment
LOL
We have 10 toes as well.
Actual reason to buy pro, *dark theme*
Exactly
plus will be enough for the dark theme
After every unity update I’m changing hex to make dark theme for free
When I can afford it I'm sure the team workflow is great.
I have pro because my mobile game I don't want to show people made with unity
$125 per month...
I can barely afford internet.
true its too costly
are u a solo developer or in a team
hard but true
It's now $150 now per month :(
but if you're in a team of 5 people and everyone pays their share it's "only" $30
Watched many of your tutorial, just realize that your Visual Studio font setting is arranged in such way that is easy for us to read it... (ie ; should be big and bulky on your real monitor). Thanks Brackeys !
Simply amazing! Whenever i'm stuck with something, there is always a Brackeys tutorial waiting to help me out! Thank You!
Seriously though! Literally anything I need help with there happens to be a Brackey's tutorial on.
Plz do more about mobile and optimization sir
Because I trust you
Lol
@@user-tn7jr9bt5t 😂
he's into something more sophisticated hardware than mobile phones. even if he wanted to, he needs to learn about it like the rest of us. unfortunately, not likely your wish gonna happen soon (or ever)
@@user-tn7jr9bt5t omg L commented🤚
Btw * i a m k i r a*
😂😂😂😂😂😂😂
Dude, are you a psychic? I was just talking to my friend about a phone app he wants to make and here you come out with a tutorial which I can use to build the idea in Unity. Nice work!
Every video that I watch I keep remembering when I just found you in like 2013, with the survival game tutorial. You came a long way
I'm gona miss awesome videos like this. This was the only channel that answered all my questions in a short and simple video.
i know
I am trying to fill the gap with my channel. commit if you get stuck, and ill answer the question with a video
Hmm video summary : asset store->Joystick [Install]
Thank you for your time
Yes fx hominem men mm green
for me, some rocket science is involved in the process, including ensuring that the correct version is selected, sifting through endless stack overflow and unity forum pages on why i cant download the package, messing with the firewall, crying in a corner, you know, the normal stuff
How so you connect it to your player
I think you are missing the transform part
I am a UI UX Designer but watching this is very insightful for me as a designer who never had the chance to design for games before. Interesting new logic I learn here. Thanks :)
Almost 1 mil subs dude! Just subscribed myself now after a few good months. Everytime I search for something about unity, you have a tutorial for it, so I mean you're a good sAuCE of information.
Thanks for this, few extra things I found that weren't very obvious: 'ScreenToWorldPoint' only works when camera is in orthographic view coz of z depth. Also if you can't see debug.drawline in game view, make sure 'selection wire' is enabled in scene view and camera near clipping mask is set to 0 else you wont be able to see it.
you are the man
this is great !
Good sir ! it will be awesome if you make more videos about advanced mobile inputs such as drag, swipe, hold, tap.
you really helped me grow as game developer.. really thanks for everything you did !
Thank you sir, i was struggling with touch controls for 2 days, this video came like a blessing XD
The only tutorial that made sense to me. Maybe I am now used to a bit of coding... I always avoided touch controls every since i started messing around with unity. Thank you so much.
What great timing! I recently started a project, pong but with power ups, and I want to add mobile controls
At last Omg I've been waiting for this for a long time thank you guys
BEST tutorial ever! I tried many similiar but this one is exactly what I was looking for!
SOURCE CODE:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Movement : MonoBehaviour
{
void Update ()
{
if (Input.touchCount > 0)
{
Touch touch = Input.GetTouch(0);
Vector3 touchPosition = Camera.main.ScreenToWorldPoint(touch.position);
touchPosition.z = 0f;
transform.position = touchPosition;
}
}
}
OMG YOU ARE A LIFE SAVER!!! i accedantly deleted the code and i came back here to re type it then i saw your comment THANK YOU SO MUCH
good boi I ill sub for doing that
Do you know how to make it work in 3D?
2 years late but, Thanks!
saver of all times
This channel is like the Enlightenment tree for me, respect Sensei!!
I love this channel and the free tutorials
Thank you, I always wanted to learn this!!!!!
You are Awesome, Bro!!!!!
Finally it is here after lots of requests. Big Thank you:)
Brackeys is the best if u want to learn anything on unity
Thanks for turning in at Brakeys!
Probably the best explanation about touch, thank you !
Awesome tutorial as usual. Wanted this one from a long time!!
This tutorial is awesome - thanks for making it! I was wondering what kind of extra tinkering it would take to make the joystick control an instantiated prefab/clone.
At last,waited for this tutorial for such a long time
I love you brackeys, U save my life I use your tutorials for my thesis projects
I LOVE YOU BRACKEYS THE BEST TUTORIALS DONT STOP BRO!
Can you please do a tutorial on the character movement with a joystick based on an isometric view?? It would really help me a lot! :)
Btw thank you for this! I've been making a game that I eventually want to put on mobile, so now I can stop procrastinating that part of it 😂
Oh Thank God, you just made a video on touch controls. I've been waiting for million of years for that video.
Very Very Thankful to you. Hail Brackeys
Beautiful tutorial man, thank you!
Please tell about how to do tap and hold movement.
Just like the movement if cube in cubethorn by tap and hold not a or d
Please create a video about good settings for a mobile game that needs to be responsive for multiple screen resolutions or aspect ratios
Anyone who has a good tutorial about this? Im also kinda stuck on this
It actually depends on your game type. There is no unique solution. But it is a pain the ass situation for Android developers.
I have my game scaling from 1080p which probably works for most people. But I too will face this problem one day. My solution is to do all the math, logic, and code myself creating a responsive and setting system.
@MR Zeus found one yet?
@@me.unpredictable280 Found one yet?
Love u man! I'm working on a school project that uses Unity for mobile devices ❤️❤️
Thank you very much! Your tutorials are so helpful.
Thank you, i was going to have to learn this eventually but im glad i got a peek into the future. Love your videos they are of great help. Cant wait to be famous in the gaming industry with my games. Keep on Brackeys!
How you doing?
Every single tutorial here, I learn more than you show.... so much more...
this man saves my life thousand times, i love you braeckys
Omg, finally somebody did this!!!
You are god @Brackeys
Thank you man!! I got a job because of you!)
seriously?
Holy shit nice
Good for you!
❤️
You should make a video about your story!
Finally an android tutorial. Thanks Brackeys!
I busted my back for three days working on my controls with a swipe 3rd person camera
And when i finished you decided to upload a video about touch controlls
I feel so stupid 😂
Keep up the good work 🌷
Awesome tutoriel, can't wait for the next👍
Finally, *_a sponser that makes sense_*
hellow you are right
RAID SHADOW LEGENDS
Hello Brackeys,
Is it possible to have a tutorial on LeanTouch asset? To be more specific, I am interested in knowing how to move, rotate and scale multiple objects in the scene(individually)
Thanks and great tuts as always :)
Brackeys videos still helping me to this day, it's like Brackey is immortal in our hearts.
after 3 years I end up in the same location
OMG your tutorials and advice are amazing !!! I just stated Making games and really you are my inspiration... please keep doing what you do.
Well...he didn't....lol
I was actually looking for a video like that *thanks* by the way could you try to continue with your FPS series
Please more videos about mobile games and touches 🙏🙏
Perfect!! I was looking for something that!! Tks, man!
This is probably the clearest and most helpful tutorial for touch input. Could you maybe do a video on VR input?
I'M WAITING FOR THIS VIDEO FOR MONTHS.. TNX
Months I've been waiting since 2016
Xd
All of this is in the documentation that you can read in 10 minutes.
@@sharklygoldman4040 It seems some people will never make any research, not even the most basic like looking at Unity's documentation... that usually pops up first on a Google request. They probably just stay idle for... years(!!!... 2016 OMG) in front of their computer's screen, brain switched off, only clicking on their browser's refresh button, hoping at each reload of Brackey's UA-cam page that he has uploaded an exact answer to their tiny need.
Newborns waiting to be fed and unable to evolve into food finders - in other words: eternal beginners.
@@EcoAku LOL. So true. And surprisingly these people still find a way to make money by stealing other people's hard work and claim it as their own.
I'd only buy pro for that dark theme/game server. Tutorials? I'd just watch you :)
This chanel is a gold mine
Thanks for this video, your explanations are really good.
Hey, great video! I would like to make a suggestion: how about a video about drag and drop UIs? I have never seen a good quality tutorial about that topic, and would really like learning it from you.
u alive?
Any intermediate tutorials coming soon?
Would love to do some! If there is any particular subject you would like we have a video_suggestions channel on Discord where you can suggest and vote on topics, feel free to add something there :)
Fading out objects in front of camera view (between camera and player) would be great
Lukasz, my first suggestion would be to cast a ray from the camera towards the player (probably each update) and if the ray hits anything obstructive, just hide whatever it hit (maybe by just deactivating the renderer component on that object) :D
You could probably also keep a list of currently hidden objects so that you can a) ignore them when they are hit by the ray whilst already hidden and b) make them visible again when they are no longer between the cam and the player.
That's at least what I would try first :) But there's probably a better/more performant solution.
This isn't much problem for me, but creating half-transparent material is. My model is voxel and I can see part of faces in back of the model, and it looks ugly. In other cases (I've tried many shaders) my model isn't casting or receiving shadows. Eventually creating good half transparent shader is really hard.
Łukasz Skabowski dont cubes/objects have some sort of transparency option you could change? Or is that a option from another game engine im thinking of.
Sir your tutorials are really easy to understand
Brackeys Is Just Simply Amazing
I use controls similar to this for my mobile zombie game. Thank you for uploading this. Id love to hear your opinion on my game if you ever have a chance I upload devlogs to showcase it.
Does anyone want to have a studio with me developing games
Connect with me here at UA-cam grob :
:) Join here: youtu.be/join/ct-xb5Juht-W60
Hit me up if you need a level designer
Yea sure thing!
@@Avidi damianjaku11@gmail.com
Whats the game called?
Hey, could you please do a video on how to drag a 3d object and move it around using touch?
It would be really helpful, love your videos!!
once you have the world position of the touch you can us that to find the object (maybe using a raycast) and then you could find the next position in the next frame, get the normalised vector for it, and then make that object go to that vector*previousdistance....
i know youve sent this comment 3 years ago.. but if you want help with this we can talk about it
@@planetofeffects5422 lol I'd be concerned if he still needed help with it 😆
brackeys tutorials makes my day
You are the best!! Your channel is amazing!
hi nice tutorial and I think that you should make more of it.
you should make more tutorials about programming, withotu refering to asset store, we are here to learn how to make something by ourselves from scratch!
You need assets for testing and visual feedback
And assets have nothing to do with programming. By using assets from the assets store, he has more time to focus on the topic of the video
yes but i wasnt thinking about models when he uses asset store, basically he downloaded joystick from store and implemented it, but all i want to know is how to program that joystcik from very scratch
@@skynet2300 Read the video title. It's about touch input, not how to program your own joystick. The joystick was just a practical example of how to use touch input.
Be cautioned! on Windows, it's a bit of a chore. It took me a couple of hours to get it working. You need the exact right versions of the JDK and SDK, and the Unity Hub is not necessarily helpful (I ended up just installing a version of Unity that the Hub supports). I also installed Android Studio to have a cross-reference for debugging and the SDK manager. You may need drivers for your device on Windows, and should restart and reboot everything multiple times. Note that your device may work with Unity, but not show up in the File Explorer; use the Device Manager. And turn off your virus scanner (that's a big one). It's not hard, just fiddly and occasionally infuriating.
I get so exited with these videos!!! I think you should have also talked about using that joystick to rotate/ move a character in a 3d environment
I was waiting for this tutorial for very long time☺️
12:25 actually it's more like the deadzone of the stick.
I was thinking the same while watching this and noticed the prefab sticks already offer the deadzone variable
only difference is that with deadzone, the stick doesn't move until you drag past it.
4:30, yeh right! i was missing 5 already!
Thank you for this, Brackeys!
Glad this channel exist
I am working on creating a game for android. I try to start earning some money from doing what I like. This tutorial helped me.
Good for you!! :)
How's it coming?
👌I think purple is your favorite color😉
Yes i also think
Yahhhh I see his colour is purple
You are a god, man. I needed this so much. Thank you, Brackeys!
Yes finally it is here so happy to see this
Thanks You So Much !!
Can you please do a video about implementing multiplayer in a game
that would be really nice
He made a whole multiplayer FPS tutorial a few years ago, that's probably a good place to start
Could you do a tutorial on 3d movement with touch screen plz
yes please
VERY useful tutorial, thanks!!
awesome explanation! very useful
i am getting this error "setup android sdk path what can i do?
"This is just an array, which means a... list"
WTF HE SAID THAT
Great video anyway! :)
Im probably wrong but I figured he only said that for the python programmers would know an array as a list.
Thank you so much!!!!!
I’m excited to code my own game now- thank you!!!
Thank you so much 🙏🏾 😄 that was so edifying
Gyroscope controls next
Still remember that video called do you need unity pro....that started with one word...nope!
That's still true. You don't have to have unity pro to develop a game. However, you cannot post your game commercially without pro or they own full rights to your game.
Pretty much it's worth getting the pro version regardless if you do it just before posting your game or if you get it from the start of your project.
But how cool is that free multiplayer server Pro offers?!?
I'll close with this statement. I think Brackey is a very professional and very talented programmer that deserves some royalties and recognition for his work. Good for him! He's shown me some pretty cool programming tricks over the years. So I'm glad to see him succeeding and still doing free tutorials.
I do not mean to mock him. I myself have learned everything about game dev from him....so sorry if that comment seemed rude.
@@grandmasterskitz748 you can post your game commercially?
@@alimertc yes, afaik there's just a threshold as to how many money you're allowed to make
@@grandmasterskitz748 not true, you can make up to 100,000 per year, any amount over that you have to pay royalties to Unity. They never "own" your game.
Thanks, brow!! It was really helpful!!!
oh god Brackeys you are the best
thank you for all the tutorials
I feel like i'm stealing this content for getting it for free
we need "Endless Runner" Game tutorial
Well u just have to set the running to be always true , then when u hit smth to stop its simple
Стилян Кръстев big brain
@@senko784 I have no clue how to do that...zero coding knowledge/experience here
@@demigodbga6280 well if thats the case u will need to learn some programm language (I recommend C#) and just follow a basic tutorial about player movement and other stuff. Programming isnt hard if u put some effort on what u want to do
@@senko784 Thanks for the advice, I really appreciate your positivity ;)
I installed iTunes and switched platform to ios. When i select my device or any ios device option on editor, i see the following error message on console
EntryPointNotFoundException: StartIosProxy
Could not start remote support for device: EntryPointNotFoundException
when i press the play button i can't see the game on my phone. How can i solve this?
haha android rocks
@@nagybalint1474 lol android go brrr
Love you, Brackeys.
Thank you so much! This is really helpful!
i got this error NullReferenceException: Object reference not set to an instance of an object
PlayerMovement.Update ()
Change in Camera Inspector tagged to "Main Camera"
0:39
so... so dark mode isnt... the most important thing.
ofcourse it is!!!
@Crimson stoped playz then you are lost!
THANKS youre tutorials help me alot
Saved my day. Thanks a ton