Тёмный
No video :(

FPS Touch Controls - UNITY 2021 Tutorial 

GDTitans
Подписаться 14 тыс.
Просмотров 66 тыс.
50% 1

Let's learn how to implement touch controls in Unity!
● NEW! FPS Controller: • Make a FIRST PERSON SH...
● NEW! FPS Touch Controls: • FPS Touch Controls - U...
● Build to Mobile: • How to Build & Publish...
● INSTALL UNITY: • INSTALL & SETUP UNITY ...
● Project Files: github.com/Cha...
♥ Don't Click This! : bit.ly/2Zi3vu9
♥ My Second Channel: bit.ly/3jvI8g6
--------------------------------------------------------------------
✅ My current Productivity Setup 👇:
● Gaming Headset: amzn.to/3HyXgp2
● Gaming Mouse: amzn.to/3ni4Ygp
● Best Webcam: amzn.to/44pVUqw
● Keyboard: amzn.to/3ALXB3M
● GPU: amzn.to/42mylNt
● CPU: amzn.to/44lOBjs
--------------------------------------------------------------------
FOLLOW ME:
● Facebook: / developer3.5pro
● Sketchfab: sketchfab.com/...
● My GitHub: github.com/Cha...
--------------------------------------------------------------------
► All content by GDTitans is 100% free. I believe that education should be freely available to everyone.

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

 

19 июн 2021

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 147   
@uotsabchakma
@uotsabchakma 2 года назад
I'm here just for the code for looking around. And this tut did helped me. Thanks for the code man!!!
@GDTitans
@GDTitans 2 года назад
No problem 😊
@blackwarrior823
@blackwarrior823 2 года назад
If you're getting error in old input system Try: Replace "=" with "==" in if statement.
@zacz7live445
@zacz7live445 2 года назад
tnks'
@ani-gamer320
@ani-gamer320 2 года назад
Yo thanks man 😂❤️
@stupidmemer08
@stupidmemer08 2 года назад
i actually surfered for 1 hour thanks bro so much
@BLANK-eb5xv
@BLANK-eb5xv 2 года назад
thankssss a lot hahaha that was helorious that i missed the detail
@alzayn3618
@alzayn3618 2 года назад
I got another error and this error says "Assets\Scripts\Player\MouseLook.cs(37,62): error CS0104: 'TouchPhase' is an ambiguous reference between 'UnityEngine.InputSystem.TouchPhase' and 'UnityEngine.TouchPhase'
@matthews9298
@matthews9298 2 года назад
When I touch the joystick to move screen back and forth it also causes the camera to rotate. Why?
@mdsami4490
@mdsami4490 Год назад
Watch the whole video lol
@user-xd5mu9np4z
@user-xd5mu9np4z 7 дней назад
@@mdsami4490 The video didn`t solve this problem dude
@navinkumar7370
@navinkumar7370 3 года назад
Can you make weapon drop and grab system? Plox?
@naimishrishu3255
@naimishrishu3255 2 года назад
watching this in 2022 !! it helped me a lot bro thanks
@GDTitans
@GDTitans 2 года назад
Glad to hear it!
@xiaodongsong2359
@xiaodongsong2359 2 года назад
I think there is something wrong with the logic of your MouseLook. What if I operate the left joystick first with the first finger, and then operate the camera rotation with the second finger?
@yogeshkadu5453
@yogeshkadu5453 Год назад
what if we iterate through each touch and store instance || TouchID of touch which is not interacting with UI, or use IPointerDown, Drag and UP event 😅 but its a bit complicated. 🥲
@Thug_Chicken
@Thug_Chicken 2 года назад
Hi bro. I saw your video and implemented the joystick and touch method. But the same goes for your project, and when you use the joystick, the joystick goes up to the maximum range and your finger goes out of that range, the camera rotates. How can I fix this? T . . T I would appreciate it if you could answer
@woozworldasinaka9725
@woozworldasinaka9725 Год назад
In (EventSystem.current.IsPointerOverGameObject(Touchscreen.current.touches[0].touchId.ReadValue())) Can we have an exception? When I'm on aim mode I still wanna move my screen while keeping the button pressed.
@woozworldasinaka9725
@woozworldasinaka9725 Год назад
@GDTitans can u help me
@luck4042
@luck4042 Год назад
Hi, i have this error when i use the bool isShooting = CrossPlatformInputManager.GetButton("Shoot"); The erros is: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. UnityStandardAssets.CrossPlatformInput.PlatformSpecific.StandaloneInput.GetButton
@user-qx4kq5lf1z
@user-qx4kq5lf1z 2 года назад
Hi. I'm following your video whose name is "FPS Touch Controls. I followed this video. And i builded and played. But the gun's effect is continuing play and jump button is not working. How can I fix it? Plz help me.
@jsrmalert9897
@jsrmalert9897 Год назад
Where can i put the MouseLook script? I cant undersatnd, where did u put?
@inteligenciafutura
@inteligenciafutura 2 года назад
It didn't help me at all, but it did guide me, good video.
@GDTitans
@GDTitans 2 года назад
I will upload another video that explains an easier way using the new input system 😀
@gamedevelopmentwithunity2050
@gamedevelopmentwithunity2050 2 года назад
Sir you are god literally I learned too much about touch controls thanku 🤩🤩💖
@jsrmalert9897
@jsrmalert9897 Год назад
I have an error : NullReferenceException: Object reference not set to an instance of an object MouseLook.Update () (at Assets/MouseLook.cs:15) How can i solve that ?
@GDTitans
@GDTitans Год назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-OFXvvuxqPNQ.html
@k-6353
@k-6353 9 месяцев назад
Hi, wonderful video, I have been trying to find solutions for three continuous days, this one is the best so far. But might you know how to be able to select which UI blocks the touch? I have UI's in worldspace and when i swipe across it, the camera control will stop/will not rotate. I have been trying for several hours and still have no working script to modify it. If anyone can help, it will be great!
@udaypankhaniya3042
@udaypankhaniya3042 3 года назад
sir can you teach us how to add footstaps sound effect and jump sound to player. thank you for this amazing series
@InfiniteCodeSource
@InfiniteCodeSource Год назад
I think you could do that with another tutorial and jsut like apply it
@1onGoogle
@1onGoogle 3 месяца назад
Hi, You don't need to create apk file to test touch screen rather you can test it from Simulator on editor..
@a.b.g9755
@a.b.g9755 3 года назад
Next tutorials on more hyper causal games like voodoo games for beginners...
@hmksoft-organization3792
@hmksoft-organization3792 2 года назад
the old input system code you give are showing error 9:59
@crystalnshpro6946
@crystalnshpro6946 2 года назад
Yes same with me
@xermi00
@xermi00 Год назад
Hi, I am having a problem with the controls. When I slide the joystick with my finger too high or too low the player looks in that direction. That shouldn't be happening when I use the joystick. Do you have any idea how can I fix that?
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Год назад
Did you figure it out yet?
@darkrai6392
@darkrai6392 3 года назад
Subscribed! Waiting for more android game tutorial!
@pufffact
@pufffact Год назад
I import your files in unity 2022 so face so many error in console 😢😢
@drskillful3461
@drskillful3461 2 года назад
Hey bro, amazing vid! Though, I have an error. It says: "The name 'Touchscreen' does not exist in the current context". How do i fix that?
@GDTitans
@GDTitans 2 года назад
Thanks for your comment Make sure to install the new input system package and restart unity And include the package using UnityEngine.InputSystem
@drskillful3461
@drskillful3461 2 года назад
@@GDTitans I figured it out myself, I was using the old input system! Btw your code for the old input has an error! It's actually 2 ==!
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Год назад
That means the object with that name is not found, the object has a different name
@drskillful3461
@drskillful3461 Год назад
@@DARK_AMBIGUOUS thanks for the reply, but I already solved my problem!
@abufaiz3896
@abufaiz3896 Год назад
Despite adding If(eventsystem.current.ispointerOverGameObject(touchscreen.current.tousches[0].touchid.ReadValue())return; My joystick still moves the camera
@xflash2581
@xflash2581 Год назад
love your explaining style 😶‍🌫😉😉
@GDTitans
@GDTitans Год назад
Glad to hear that.
@DarkMooN-uh1ih
@DarkMooN-uh1ih Год назад
Thank's a lot GDTitans i learned a lot of things
@GDTitans
@GDTitans Год назад
I'm glad to hear that!
@Heimdall12345
@Heimdall12345 2 года назад
Hi bro Can you make another video about How to make reaload button Zoom in/out and gun change buttons?
@dahdousoufyane3795
@dahdousoufyane3795 Год назад
NullReferenceException: Object reference not set to an instance of an object MouseLook.Update () (at Assets/Scripts/Player/MouseLook.cs:39) Pleas help me
@GDTitans
@GDTitans Год назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-OFXvvuxqPNQ.html
@DivaGameDeveloper
@DivaGameDeveloper 2 года назад
Iam unable to use TouchScreen can u please help me to how to use that keyword..
@noxtorious2962
@noxtorious2962 Год назад
up
@hrithikroshansingh3006
@hrithikroshansingh3006 Год назад
sir in Joystick pack fixed joystick script is missing
@sanghoonlim6505
@sanghoonlim6505 Год назад
Can I ask you to subtitle? Because I can't use auto translation, and I want to read subtitles.
@learntech3323
@learntech3323 2 года назад
can someone please give me the crossplatforminput and editor folder without the other useless files thanks
@fachri17
@fachri17 2 года назад
Sir thankyou so much, it help me a lot sir
@afrozkhan2094
@afrozkhan2094 9 месяцев назад
Nice Tutorial!
@GDTitans
@GDTitans 9 месяцев назад
Thanks!
@icjhonny9390
@icjhonny9390 2 года назад
Het plzz make a all button event trigger plz I can't understand to set like scope button , help us
@GDTitans
@GDTitans 2 года назад
Actually there is an easier way by using the new input system. I am gonna upload a video to demonstrate that. So, make sure to follow my 2d platformer series 😀
@icjhonny9390
@icjhonny9390 2 года назад
@@GDTitans ok thnx bro
@ani-gamer320
@ani-gamer320 2 года назад
It's not working if i press joystick after that if i tried to move player then it's not working? Can you tell some fix
@GDTitans
@GDTitans 2 года назад
Check out the script on Github github.com/Chaker-Gamra/FPS-Game-Unity
@ani-gamer320
@ani-gamer320 2 года назад
@@GDTitans thnx ❤️
@underratedtheboi7595
@underratedtheboi7595 2 года назад
Will it work on rigid body?
@vextorfx6243
@vextorfx6243 2 года назад
i just want to know where did u put MouseLock file in canvas ? that connected with Image? or with camera?
@jsrmalert9897
@jsrmalert9897 Год назад
i wanna know that too, do you know where ?
@pritalol-sc2or
@pritalol-sc2or 6 месяцев назад
me too
@Nick-rq4gy
@Nick-rq4gy 2 года назад
thank you for making these videos
@GDTitans
@GDTitans 2 года назад
No problem 😊
@jawadsabih4979
@jawadsabih4979 2 года назад
@@GDTitans assalamu alaikum can you plz help because the last thing u did didnt work i am still getting the bug where both joystick and touchfield move
@saramotamaralayefaemmanuel9772
Starter assets is no longer available
@iyadhatem6955
@iyadhatem6955 Год назад
You are Boss Man, Thank you.
@GDTitans
@GDTitans Год назад
You're welcome!
@d1kiywolf
@d1kiywolf 2 года назад
hi, i have an error on cs:22 "object reference not set to an instance of an object" (11:08)
@lolip_p
@lolip_p Год назад
please tell me, did you solve this problem? if yes, please tell me how to fix it
@d1kiywolf
@d1kiywolf Год назад
@@lolip_p i don't remember. better use another tutorial
@ani-gamer320
@ani-gamer320 2 года назад
I'm facing one problem it work awesome but when joystick is pressed then I can't rotate my player?
@GDTitans
@GDTitans 2 года назад
github.com/Chaker-Gamra/FPS-Game-Unity/blob/master/Assets/Scripts/Player/MouseLook.cs
@ani-gamer320
@ani-gamer320 2 года назад
@@GDTitans Thanks ❤️
@Heimdall12345
@Heimdall12345 2 года назад
Bro did you fix it? I have the same probem
@djkorou
@djkorou 2 года назад
hey, this would have helped but can you please put the first person movement script? along with the mouse look
@GDTitans
@GDTitans 2 года назад
Check out the project on my github account github.com/Chaker-Gamra/FPS-Game-Unity
@Radspidey
@Radspidey Год назад
Does anybody know how to decrease the touch sensitivity @GDTitans
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Год назад
Yes but I don't know how to code, I use the visual scripting so I just use the math units and I divide the number before it's connected to "Set Position"
@WaffleTM420
@WaffleTM420 3 года назад
Damn that is really helpful for my iOS game
@martinthilak6573
@martinthilak6573 3 года назад
Really helpful, thanks for the tutorial.what about the sniper scope button.if possible teach us.
@GDTitans
@GDTitans 3 года назад
It's easy try to use what you know to implement it.
@martinthilak6573
@martinthilak6573 3 года назад
Okay I will try thank you.
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Год назад
It's 100% possible, just make a button that plays an animation of the camera zooming in, then make one of it zooming out
@sakuraharuno8046
@sakuraharuno8046 3 года назад
Please make a tutorial on weapon and ammo pickup and drop system
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Год назад
Just make the objects have a collider and set it to "Trigger" and then make it so On Trigger Enter, the object gets added to your inventory or spears in your hand, or however your game works, I can't really explain it because every game works differently, then make it so lastly, the object is destroyed
@ashazaliazhar8058
@ashazaliazhar8058 3 года назад
Assalam alaikum nice video
@GDTitans
@GDTitans 3 года назад
Walaikum assalam, Thanks
@creativetechlmchannel7779
@creativetechlmchannel7779 Год назад
sir what programming are you using?
@GDTitans
@GDTitans Год назад
C#
@creativetechlmchannel7779
@creativetechlmchannel7779 Год назад
@@GDTitans thank you
@techhack5775
@techhack5775 2 года назад
Thanks bro
@GDTitans
@GDTitans 2 года назад
You are welcome
@udayprajapati4459
@udayprajapati4459 3 года назад
Plz create video on game objective
@nakendamacesarezate1797
@nakendamacesarezate1797 Год назад
where the button handler script???
@a.technology1446
@a.technology1446 3 года назад
Thanks a lot
@videoclipschannel100
@videoclipschannel100 3 года назад
Hi, thanks for this nice tutorial, I am using the old input system and uses joystick controls and implemented codes given in the video, when I build my game on android uses a joystick for moving the screen will movies because it counts the touches on the joystick as well, how can I use this joystick only for moving the character and not for moving the camera. I am using the MouseLook script.
@user-oy2jr2lk4c
@user-oy2jr2lk4c 6 месяцев назад
Hello, has this issue been resolved
@ArabicIShowSpeed
@ArabicIShowSpeed 13 дней назад
Is it free to use, thank
@stupidmemer08
@stupidmemer08 2 года назад
hello sir i have error that on old input it says you cannot use "&&" between bool and float type please help me
@fachri17
@fachri17 2 года назад
Use == instead of = sir
@alzayn3618
@alzayn3618 2 года назад
@@fachri17 Thanks but I got another error and this error says "Assets\Scripts\Player\MouseLook.cs(37,62): error CS0104: 'TouchPhase' is an ambiguous reference between 'UnityEngine.InputSystem.TouchPhase' and 'UnityEngine.TouchPhase'
@xermi00
@xermi00 Год назад
@@fachri17 tysm, I fixed it
@blokkiesotto5854
@blokkiesotto5854 2 года назад
pls help cuz my joystick doesnt work
@HD_TOON
@HD_TOON 2 года назад
How to add grandes in this game
@GDTitans
@GDTitans 2 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-BYL6JtUdEY0.html
@jud.su.5developer895
@jud.su.5developer895 2 года назад
How can shoot and aim on one button
@lucasradioativo
@lucasradioativo Год назад
make Third Person Controlle please
@josuegaming2965
@josuegaming2965 2 года назад
I have 15 problems with the system input
@thaergamer5828
@thaergamer5828 3 года назад
make a tutorial about survival game
@PPSSPP0002
@PPSSPP0002 Год назад
Gradle build failed
@PPSSPP0002
@PPSSPP0002 Год назад
How to solve
@GDTitans
@GDTitans Год назад
For the first time, it needs internet access
@PPSSPP0002
@PPSSPP0002 Год назад
@@GDTitans yes and after
@stupidmemer08
@stupidmemer08 2 года назад
best sir ;>
@mostafayasser5645
@mostafayasser5645 3 года назад
could you please teach us how to make tournaments in unity in which you could face random rivals and if you qualified you face the other qualified rivals till reaching the final and the you are the champion
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Год назад
I guess you would use Mirror Networking or one of the other multiplayer things
@yusufum_
@yusufum_ Год назад
great
@GDTitans
@GDTitans Год назад
Thanks 😊 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-NDDXip3ex94.html
@sultangaming2022
@sultangaming2022 Год назад
whay dont work
@GDTitans
@GDTitans Год назад
This is the new way that works with the new input system ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-wdsLDogAALI.html
@CreateCG1
@CreateCG1 Год назад
I want hidden controls
@GDTitans
@GDTitans Год назад
I've talked about that in this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-wdsLDogAALI.html
@CreateCG1
@CreateCG1 Год назад
@@GDTitans no like a cross play game for mobile & pc
@CreateCG1
@CreateCG1 Год назад
@@GDTitans i need help with my fps game
@Gamer-bg8bk
@Gamer-bg8bk 2 года назад
can anyone help? :)
@GDTitans
@GDTitans 2 года назад
Hey what's up
@lucasramos001
@lucasramos001 Год назад
Sensacional 👏
@erickhjc
@erickhjc Год назад
E mano samos unicos br aqui aprendendo kkk
@startandplay688
@startandplay688 3 года назад
hey please make fast video because i want to publish my game on play store.., (how to proper build a game for play store ??).., please given details for update password, key, intro, google ads bundle ??
@user-fv6nc7qi2x
@user-fv6nc7qi2x Год назад
Lojitik
@navinkumar7370
@navinkumar7370 3 года назад
Thonks
@designer.trifonov
@designer.trifonov Год назад
сложно
@Gamer-bg8bk
@Gamer-bg8bk 2 года назад
Hello! I get these error messages: I press the jump button but I immediately receive these sentences: 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. UnityStandardAssets.CrossPlatformInput.PlatformSpecific.StandaloneInput.GetButtonDown (System.String name) (at Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/StandaloneInput.cs:22) UnityStandardAssets.CrossPlatformInput.CrossPlatformInputManager.GetButtonDown (System.String name) (at Assets/Standard Assets/CrossPlatformInput/Scripts/CrossPlatformInputManager.cs:121) PlayerMovement.Update () (at Assets/Scripts/PlayerMovement.cs:66)
@jawadsabih4979
@jawadsabih4979 2 года назад
u are using old input system
@HD_TOON
@HD_TOON 2 года назад
How to add levels in this game
@GDTitans
@GDTitans 2 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-S5eo5cFk51U.html
Далее
How to Upload your Unity Projects to GitHub In 2023
11:06
10 Minutes vs. 10 Years of Animation
19:29
Просмотров 834 тыс.
The Clever Way to Count Tanks - Numberphile
16:45
Просмотров 941 тыс.
I Made My First Game in Godot in 3 Weeks...
26:21
Просмотров 304 тыс.
I Built a Transparent Boomerang (it's lethal)
13:10
Просмотров 3,6 млн
Dear Game Developers, Stop Messing This Up!
22:19
Просмотров 704 тыс.
I Tried To Beat Minecraft Backwards
18:53
Просмотров 1,2 млн
Learning C++ by making a Game... in 1 Week?!
10:14
Просмотров 427 тыс.
Full Body FPS Controller - Unity Tutorial #1
27:28
Просмотров 75 тыс.
TOUCH CONTROLS in Unity!
16:09
Просмотров 1,3 млн
Unity's New Input System:  The Definitive Guide
32:07
Просмотров 26 тыс.