Touch Third Person Character Controller in Unity 2018 🎓
This time I will show how to implement a thirdperson controller with touch gestures. If you want to make a third person shooter for mobile devices, then this video could be helpful to find a start how to implement your game logic. I will show you three methods: AutoLook &JoystickLook, TouchLook.
I tried to keep this video as short and simple as possible.
Fixed Button / Fixed Touchpad: gist.github.com/ditzel/0257d7...
Joystick Pack: assetstore.unity.com/packages...
The script I wrote: gist.github.com/ditzel/3933ef...
Full Tutorial Series:
Part 1: • Touch Third Person Cha... (current)
Part 2: • Make an own Mobile Thi...
Part 3: • Mobile Third Person Sh...
Пікірлер: 436
See project files here: bit.ly/ditzelgames See updated video here: kzread.info/dash/bejne/Y6iH1o-TlajAfqQ.html Fix the error "inputVector": 1) Find the script in the project name “Joystick”. 2) open the script “Joystick”. 3) find the string “protected Vector2 inputVector = Vector2.zero” and change that to “public Vector2 inputVector = Vector2.zero”. 4) save the script “Joystick”. That is all 😊 good luck! >:)
@Nnjaaaaaaa
5 жыл бұрын
Hi I keep on getting this error and I'm just following what you do "Assets/ThirdPersonInput.cs(26,39): error CS1540: Cannot access protected member `Joystick.inputVector' via a qualifier of type `FixedJoystick'. The qualifier must be of type `ThirdPersonInput' or derived from it"
@tonynealis1165
5 жыл бұрын
I can't find CS1540 error on internet, so if you still need help, my guess would be that the qualifier has to be thirdpersoninput, or as noted, dervied from it, in other words from the class, I believe so the api used would have to be from that class ( as I understand coding, i'm far from an expert). Hope you got it figured out, as I often ask here, there everywhere and months, days can go by with no answer,,I think engines should do a far better job, and none of them do great, - but then Unity as the others, has paid support, so ---sadly that may be whats going on here--and others have limited time - blah blah. Regardless, sorry your answer went 2 wks with nothing, and I hope my answer steers you in right direction.
@Nnjaaaaaaa
5 жыл бұрын
hi @tony nealis thank you for the response, I removed this kind of feature in the game I'm currently developing for out thesis and I think my error was due to the version of my unity. Replaced joystick movement with click to move. I still can't derive codes because I'm still trying to learn about the codes and their different functions but I still thank you for the suggestion.
@user-ug6vd8ud1v
5 жыл бұрын
I launch project APK and everything is pink. Why may this happen?
@alfonsotorres2302
5 жыл бұрын
amigos en la nueva actualizacion del assent (Joystick Pack) para corregir el error se encuentra la variable con input en la clase Joystick.cs => private Vector2 input = Vector2.zero;
This means a lot to me thanks for this tutorial and first person tutorial THANK YOU SO MUCH
I love you for making this tutorial 😭 I finally found this after so many days 😭😭😭 but thank you so much 🤍🤍🤍🤍🤍
Thank you. You rescued me, man. It's working very gooooooooood.
Why this guy has only 18.1k subs.... He deserves 1million+ subs
Amazing tutorial man. Thanks!
AweSome!!!! little bugs with fixed button (monobehaviour) and therewas no inputvector although there was input so it all worked out !! Thanks a ton!!
That's what I call a nice third-person controller tutorial! Well done! 👍🤓
All, for those of us in Unity 2019.3 or above, with the inputVector issue, here's how to fix it. 1) ThirdPersonInput section will be "Control.Hinput = LeftJoystick.input.x; Control.Vinput = LeftJoystick.input.y;", NOT inputvector 2) Find the script in the project name “Joystick”. 3) Open the script “Joystick”. 4) Find the string “protected Vector2 input = Vector2.zero” and change that to “public Vector2 input = Vector2.zero”. 5) Save the script.
@caglarkutluyigit3238
3 жыл бұрын
Thank you
@ramakrishnan.v6208
3 жыл бұрын
Hey my fixedjoystick script is empty what should I do? Please help
@Abo7moodUnity
3 жыл бұрын
@@ramakrishnan.v6208 see the Discription
@youseafadel
3 жыл бұрын
TY very much
@satrioopw
3 жыл бұрын
oh my god thankyou so much finaly fixed it
Thank you for the tutorial, this really helped me to develop my Android game project.
@aryanshanker9169
3 жыл бұрын
What's the name ?
you just gained a sub. you deserve more
this is the BEST tutorial this channel has offered uptill now
@spyder_f3m6oy
3 жыл бұрын
Did all controls work for ur project? Pls reply bro
@muhammadahmadyousaf2824
3 жыл бұрын
@@spyder_f3m6oy yes .
@muhammadahmadyousaf2824
3 жыл бұрын
@@spyder_f3m6oy youtube didn't notify me that's why i am replying late. if you need help i m willing to offer/share my knowledge
@spyder_f3m6oy
3 жыл бұрын
@@muhammadahmadyousaf2824 thats so nice of u 😁😊.btw I've gotten what I needed, Thanks alot👍👍
@spyder_f3m6oy
3 жыл бұрын
@@muhammadahmadyousaf2824 oh wow, even u have a game dev Playlist. 👈🤗
THI IS GOLD ,.. thanks PAL
Thanks for the tutorial.
really cool, I like this a lot
Thanks it helps a lot.
Thanks bro working ❤️
nice video very helpful
thank you so much, you saved my credit!!!!!!!
Wow! cool tutorial. Can you make another joystick on right side which fire at certain area or make like a top down shooter?
When I wrote public FixedButton shoot; After compiling showing Are missing an assembly reference
If the tag in the camera part is not necessarily the main camera, you will have a problem;).Good Tut. Thanks DitzelGames
Thanks for helping :)
this a great tutorial :)
Great Work Dear Keep it Up :)
Thanks so much!
How you make running movement my character is jus moving forward and not any movement
Hello, how can I look in multiple directions rather than having it only turn left and right like you showed? @DitzelGames
Hi. I tried this but got a lot of errors and I downloaded from the bitly link but it is not the same as this project. I really would like some help.
@zebaa5247
3 жыл бұрын
@GAMER TéCH Yeah same here
Thank you
There is right and left in the camera angle, yes, but how do we adjust it to look up and down?
In 2020, if u used the same package, when you changed inputVector, it is not protected Vector2 ... but it is private.. so just change the private by the public.. and don t write inputVector, but input in ThirdPersonControl... @DitzelGames, nice work, you are the best :thumbsup:
Awesome video.
I downloaded same unity you have, placed my older scene that I wanted to keep add onto of course, but when I go to import asset > all I have there is custom . What would cause this,,how do I get all of what you have there ? Character wize, all I have is the engineer, yet you clearly have Ethan which I prefer.. thx
@tonynealis1165
5 жыл бұрын
I guess it just doesn't show, what you already have installed.
hi sir, i appreciated the video so much. But i was wondering, where did you get the Standard assets?
@DitzelGames .Hi , I have this error object does not contain a definición for x and no acessible extensión method x accepting a girar argument if type object could be found . Help please
in script writing m jump m input v input how to fix
I have used the method with the touch camera controll but the camera is constantly moving to the right
best tut ever !!
Tell me how i can adjust my own corrector or how to replace ethen ... thanks
Script thirdpersoninput not working on unity 2019.1 :( Can you help me? Thanks
Thank you!
I could not find a Turkish source for this job. Thanks for sharing!👏🏻
Assets\Scripts\ThirdPersonInput.cs(30,42): error CS0029: Cannot implicitly convert type 'UnityEngine.Quaternion' to 'UnityEngine.Vector3'
why ThirdPersonUserControl Control cant Import/Using UnityStandardAssets ?. It just require to create another component. :(
I am making a TPS Game and I have a Aim UI. But the problem is that its looking over the Player. What can I do to show the player slightly left side?
Thank you!!
I have a question how to fix camera penetration through models (empty inside)?
The type or namespace name 'FixedJoystick' could not be found
Everything is great sir I am just facing problem i setting coordinates camera when i play i cant see my character Quaternion.AngleAxis(CameraAngle, Vector3.up) * new Vector3(0,3,4); Can somehow we set it to default coordinates that we have chosen please help
2023 пригодилось, спасибо)
I am using the Fixed touch zone script and it works great until I press another finger on the screen! when I put another finger on screen the camera position suddenly changing, and after putting of the finger it goes back to the normal position!
I got error in FixedButton n FixedTouchField
@nihal9372
2 жыл бұрын
Did you find the solution?
hey i do it all thing exact you do that and i have no errors but i dont know why i cant move with joystick
Need help! I followed the directions completely. but my controller for player only controls the camera view. my character doesn't move, only the camera. pls help guys...
Can i use first person controller and thrd person controller in the same project?my first person controller is working fine.when i import your project.everything mess up.
Assets\Standard Assets\Characters\ThirdPersonCharacter\ThirdPersonInput.cs(8,12): error CS0246: The type or namespace name 'FixedJoystick' could not be found (are you missing a using directive or an assembly reference?) please help me
@ttttkk2
3 жыл бұрын
I got the same error, someone pls help!
how to rotate camera view using click and drag using mouse(left or right click)???
Whenever i stop moving right joystick camera postition is go to normal (default) help !
Assets/ThirPersonInput.cs(8,9): error CS0246: The type or namespace name `FixedJoystick' could not be found. Are you missing an assembly reference?
@taimigamedev6141
4 жыл бұрын
have you solved your issue? if yes then please let me know I am facing the same issue that you fave one year before! waiting for a positive answer.
Thanks Bro....
That's my problem: Assets\ThirdPersonInput.cs(29,51): error CS1061: 'object' does not contain a definition for 'y' and no accessible extension method 'y' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) Can who help me?
How to rotate camera view using another joystick. For suppose if someone wants to look back or sideways while walking forward. Often required in FPS games, PUBG, etc. Can you please make a tutorial for it ?
@DitzelGames
5 жыл бұрын
Thanks for your question! Here is the answer: kzread.info?o=U&video_id=WHlZTv5zBbs
in new joystick pack in asset store there s no fixedbutton . I can not add fixedbutton so i added 2 fixedjoysticks ...
Does someone know how i can make Ethan (the third person character controller) move towards the camera point (move where the camera Is facing) with pc controls (mouse)
Excellent vídeo, to see if you could help me with something that my game needs, it would be just what you did with the character controller in 3 person but with the camera of 1 person , in this way the character in first person would have animation of walking, i think that it's easy sure, thank you.
Hi guys! How to fix the error with = FixedJoystick LeftJoystick; error error error…. `Joystick.inputVector'??? 😊))) I'll help you :)). 😊😊😊 So.😊 1) Find the script in the project name “Joystick”. 2) open the script “Joystick”. 3) find the string “protected Vector2 inputVector = Vector2.zero” and change that to “public Vector2 inputVector = Vector2.zero”. 4) save the script “Joystick”. That is all 😊 good luck! >:) DitzelGames, thank you so much for your work. you're cool!!)
@arkamajhi
5 жыл бұрын
This actually works. At least worked for me. For the ones who can't figure out where the joystick file is : Go to assets and type joystick in the search bar, there. You will get the C# file easily. Best of Luck Thank you джерик джери for the help
@shooorov
5 жыл бұрын
thanks man
@vxdigxx5408
5 жыл бұрын
obrigado
@Nnjaaaaaaa
5 жыл бұрын
THANK YOU SO MUCH BRO
@kenethadrianariasperez3715
5 жыл бұрын
tanks you, "Dios te bendiga" me salvaste la vida....
sir, you are awesome. i think you must teach us how to make a full tutorial about thirdperson game. like a how to make a characters, how to make animation works. just like from zero to hero. thank you sir
in my case all code is correct but when i play and rotate it stuck and error (object reference not set to an instance of an object)
i don t have rigidbody. i have an object who i going forward and i want to change direction (left right up down )with joystick. i find only controls for bals and other shit . how to do that? please explain this
okay i love you! it works perfectly, my only question would be " how do i write a line so the touchfield will move the camera up and down and not only left right?"
@harshpatil6782
3 жыл бұрын
Did u find plz tell me❤️
@nypcsj809
3 жыл бұрын
Hi have you found a answer?
@harshpatil6782
3 жыл бұрын
@@nypcsj809 I found bro
@nypcsj809
3 жыл бұрын
@@harshpatil6782 Hi bro can send me the solution?
@nypcsj809
3 жыл бұрын
@@harshpatil6782 Can you send me a message on discord - cyberjj999#2733
What version of unity are u using there is no third person controller in my unity 2018 version
Wonderful Video, and Your way of Teaching is fabulous man Keep it up
how did you set the animation to walk and jump? plsss answer mee hehe
Hi, is it okay if I used your third person character controller to showcase my portfolio? Assets would be done by myself, I just need your awesome character controller to move them.
hello, thanks for the tutorial. I got an error when i add camera.main.transform.position & camera.main.transform.rotation it's said that Update() got null reference
hi, can i use the entire touch as a controller, without using a joystick'? can yo tell me how can i do it?
Thanks a lot
the problem is i cant create a script in the same object, how can i do that, and i cant write x and y along with input vector plezz help me i have to submit an android game for my minor project
*_Hey bro I want to change the Camer *_*_ a Angle but they don't workthey show the default camera Angle_*
Please help me, after I changed "protected vector2" to "public vector2" in the 138th row there were still 6 similar errors. is there anything left over? please respond yes. Thank you
@narmadarajput9035
3 жыл бұрын
First reset that string. Then in ln41 and col5 change private to public
*buenos tutoriales me encantan brother saludos desde colombia.*
@DitzelGames
5 жыл бұрын
Mi español no es el mejor, pero gracias por su comentario!
@kenethadrianariasperez3715
5 жыл бұрын
pudiste corregir el error de inputvector?
@JoRob17
5 жыл бұрын
solo tienes que buscar esa variable en el codigo y quitarle protect o private no me acuerdo y colocarle public, y asi sera accesible desde cualquier parte de los otros script
Nice ! But my joystick seems to go out of the screen when I build its apk. How to make it fit to mobile screen ?
it is showing the namespace FixedTouchfield is missing
Hallo, ich habe den ersten Teil wie auf dem Video befolgt, doch beim testen erscheint eine Fehlermeldung: Assets\ThirdPersonInput.cs(24,51): error CS1061: 'object' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) Was soll ich da tun ? First video part i got below error message - how can i solve it ?
@tomythomas8996
3 жыл бұрын
I same
How can I unlock ThirdPersonUserControl to be able to edit it? Thank you!
@andresrestrepo8585
5 жыл бұрын
Nevermind, I just had to run Unity.exe as administrator
Bro please help me I don't know what happened. when I try to add ThirdPersonInput script to player and then it says "The script 'ThirdPersonInput' does not contain a class derived from UnityEngine.MonoBehaviour Everything looks fine but I don't know why unity says this error Plz reply bro
The camera goes down everytime to the player's foot even if i have set it up. Please help
@algericotape5654
4 жыл бұрын
same problem... camera and my character rotating i just followed the step
Hello, When I wrote ThordPersonInput, there were written that "FixedJoystick does not contain a definition for 'inputVector' ". How can I solve this?
@ridaiftikhar4386
4 жыл бұрын
Instead of 'FixedJoystick.inputVector.x' I used 'FixedJoystick.Horizontal' and it worked for me. Same goes for the y axis, I used 'FixedJoystick.Vertical'
@itshardtobreathe9992
4 жыл бұрын
@@ridaiftikhar4386 Thanks, I will try to write this.
Hi, your controller is pretty smooth and useful, but I have two questions: Firstly, how can I make it so that I can look not only horizontally, but also vertically? Secondly, how can I implement an obstacle detection system for the camera so it doesn't go through an object?
@muhammadahmadyousaf2824
3 жыл бұрын
dear brother if you find the solution to question 1 do let me know . the answer to your second question lies in this video.... kzread.info/dash/bejne/fGV7ydh9ltCvn5M.html
Im getting errors from ThirdPersonInput script. (1,33): error CS0246: The type or namespace name 'MonoBehaviour' could not be found (are you missing a using directive or an assembly reference?) (4,12): error CS0246: The type or namespace name 'FixedJoystick' could not be found (are you missing a using directive or an assembly reference?) (5,12): error CS0246: The type or namespace name 'FixedButton' could not be found (are you missing a using directive or an assembly reference?) (6,12): error CS0246: The type or namespace name 'FixedTouchField' could not be found (are you missing a using directive or an assembly reference?) (7,15): error CS0246: The type or namespace name 'ThirdPersonUserControl' could not be found (are you missing a using directive or an assembly reference?) + additional 13 errors
@ayushkamboj2812
3 жыл бұрын
contact with voice maybe i can help because i have also been through them
@DEVINC894
2 жыл бұрын
@@ayushkamboj2812 same error can you please help me
try that. void Update() { Control.m_Jump = Button.Pressed; Control.Hinput = LeftJoystick.Horizontal; Control.Vinput = LeftJoystick.Vertical; }
@nickgame98
4 жыл бұрын
i did that before just to check and it works (Y)
@senanihuseynzade7139
4 жыл бұрын
tesekur ederim.Danke
Fixed Joystick script is empty. How to resolve this. Thank you
i have a problem thirdpersonusercontroller does not have Hinput or Vinput in unity
We are only rotating camera on the basis of x axis. how to rotate so that player can see the sky and earth also? anyone plz help?
Object reference not found error in camera for left and right joystick
Does anyone know how I can adjust the script to allow the character to look up and down and not just left and right?
@killshot3933
3 жыл бұрын
if you locate the line in the script that looks left and right (x axis), then just duplicate it and make it move with y axis (up and down), changing the input as well from x to y
thirdpersoninput script m jump m input and v input red colour aara visual studio me
@raghavnautiyal4175
6 жыл бұрын
i don't think he understands hindi bud :(
Hello. How to make the character slightly to the left side of the centre of the camera view ? THANK YOU
@DARK_AMBIGUOUS
Жыл бұрын
Just move the camera to the right some
Screenspace Canvas panel blocks other world space canvas buttons.how can i solve this?