Search Unity

brakeys movement tutorial touch control

Discussion in '2D' started by Loik-San, Jul 26, 2021.

  1. Loik-San

    Loik-San

    Joined:
    Jun 15, 2021
    Posts:
    12
    so i followed the brakeys movement tutorial but i need to had ui buttons as touch control to them.
    i want to make one of the button to do the negative value of the input manager horizontal thing and another one the positive. Can you help me please??? thank you!
     
  2. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,465
    If you have 2 different UI buttons, one for negative and one for positive, then you need 2 different functions in your script. Can you post the code you have already? Use code tags please (text bar)
    upload_2021-7-26_8-27-59.png
     
  3. Loik-San

    Loik-San

    Joined:
    Jun 15, 2021
    Posts:
    12
    I deleted everything I had because it was getting unreadable. And since I couldn't find anything to help me on the Internet I asked here
     
  4. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,465
    Try a video like this:
     
  5. Loik-San

    Loik-San

    Joined:
    Jun 15, 2021
    Posts:
    12
    big thanks but i have another issue. it is not related to the left and right movement but with the dashing in my game. should i create another post or you can help me here?
     
  6. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,465
    Create another post and ill try to help
     
  7. Loik-San

    Loik-San

    Joined:
    Jun 15, 2021
    Posts:
    12
    ok thx
     
  8. Loik-San

    Loik-San

    Joined:
    Jun 15, 2021
    Posts:
    12
  9. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,465
  10. Loik-San

    Loik-San

    Joined:
    Jun 15, 2021
    Posts:
    12
    they are waiting for moderation... :/
     
    Cornysam likes this.
  11. Loik-San

    Loik-San

    Joined:
    Jun 15, 2021
    Posts:
    12
    its ok now you can go to the link and maybe help me