Adding Touch Screen Controls - Unity 2D Platformer Tutorial - Part 27

preview_player
Показать описание
Learn how to add touch screen controls to your platformer game!

And you can also find me on twitter and facebook!
Рекомендации по теме
Комментарии
Автор

man, for the past 3 days I have been struggling with these buttons and how to make them work, there was always something not working properly or anything working at all! Now after I have watched your video, I was able to implement the controls and after a little more time programming, I could make everything answer the way I wanted. I fell out of nowhere in your channel and now I have subscribed and will watch your other videos when I have time, you already have helped me a lot, thanks!!

opauloantonio
Автор

For people having issues with the character move, check in update for this line:



and change for:

#if UNITY_STANDALONE || UNITY_WEBPLAYER

#endif

because:

in the update override the touch control.
so Move will be 0 each frame.

Great tutorials. subscribed. ;)

elmatt
Автор

Man you tutorial is the best, I've spent loads of time with reycasts, input.touches, this method its the cleanest, congratulations!

CanaldoCaverninha
Автор

Amazing tutorial!!! Thank you so much for the touch screen controls. Can't wait for the next one.

petipois
Автор

Could you show how to add a simple local multiplayer? just like someone else that can do the same things as you but is controlled with different keys? its not exactly like what we have had before

jeffreyjarry
Автор

In Response to Jeffrey Jarry who asked about a simple Local Multiplayer, you could just recreate the PlayerController Scirpt for another player and swap out the GetKey A and D code and change for different keys. Same with the Jump portion of the script. Then make a new character with a new rigidbody2d and add the script that you just made for the second player. As for making it so they could join at any point and drop out at any point I'd have no idea where to begin.

PS gamesplusjames You're video tutorials are much more helpful than the official Unity3D tutorials on their site. You go into more detail as to what each piece of script does, and also how it can be used. Thanks :)

niallseanwestwood
Автор

Where did the myrigidbody2D line come from? I only watched tutorial 1-11 to this because I was ready to put it on my phone should I go to a certain one? around 16:40. Its seems that theres a rigidbody2d AND a MYrigidbody2d? aren't they the same?

lacheporter
Автор

Hello GamesPlusJames! I'm currently following your Christmas 2-Player Snowball Game but since I want to add touch screen Control to it, I decided to paus it half way through because this tutorial has touch screen Controls in it. Whats neccesary to change in the script, if I have followed the previous Snowball Game and now I'm following this one?I really appreciate your videos and if I ever finish my Little game and it maybe gets some download, I'll be sure to notice you, senpai! :D (also in the credits maybe :D)

hoornii
Автор

My character only moves for one frame and then stops when I use this method. Any advice?

Jess_IsCringe
Автор

Great Tutorials. Could you help out with setting up a touch pad for all directions in place of the forward and back arrows. With only the arrows there is no way to climb a ladder and adding an up and down arrow is just too many buttons on the screen. Thanks for all your awesome work, very easy to follow along and have learned many new things.

sskethan
Автор

Jumping is fine with the button, but there is no movement what so ever. The public void Move script is identical and so is the TouchControls script. The event triggers are also setup fine. I don't know why they aren't working at all. any help?

niallseanwestwood
Автор

For all those who are having an issue with movement, like player is moving 1mm, I found a solution. Just comment out "Move(Input.GetAxisRaw("Horizontal"));", you don't need it.

mGradDarko
Автор

Can you show us how to compile a game in different screen resolutions.
Thanks

gerardorodriguezmartinez
Автор

Hi James, did you make that separate video you mentioned here? or is this one still good? Thanks.

duskomarincic
Автор

Can you help make a shop where you buy different characters using the coins in the game

MatuBub
Автор

i tried to use your UI code in Sunny Land and the movement controls(left and right) works fine but when I insert it to jump and crouch it won''t jump please help I will send my code here

blankphantom
Автор

My player just looks left or right, he is not moving and I don't really understand why. The touch works since he is turning when I press the buttons, but he doesn't move. I tried everything but still can't get it to work . Anyone have any suggestions ?

pecehash
Автор

Do you think i can use this to make something like the Omni or Cynerith base pads that are used to walk in VR

MUSHIN_
Автор

thank you so much for this video, this helped me so much :)

bunxiibreaks
Автор

how can we add joystick or something for left right and jump?

kucingfires
welcome to shbcf.ru