Search Unity

Bug On screen controls working for one gameobject only

Discussion in 'Input System' started by deathkill781, May 13, 2023.

  1. deathkill781

    deathkill781

    Joined:
    Jun 3, 2021
    Posts:
    2
    Hello. There is this weird thing that is happening for me when use the On-Screen Stick component, and the On-Screen button as well, where if i map the image to a certain input, the one for the other player doesn't work. Let me provide more for better clarity.

    Here for example, I am moving the stick responsible for moving the blue character, and it works fine:
    upload_2023-5-13_21-24-16.png
    However, when I try to do the same for the green character, he just doesn't move:
    upload_2023-5-13_21-19-57.png
    Even though the input the image is mapped to moves the character just fine. The stick on the left is mapped to the left stick, and the one on the right is mapped to the right stick. If I used a controller to move them, it works fine, but if I am using the touch inputs, it is only applying for the blue player.
    Here is my Input asset for the green player:
    upload_2023-5-13_21-25-17.png
    And here is the one for the blue player:
    upload_2023-5-13_21-26-20.png
    The weirder thing is that I have right stick on both assets, but for some weird reason the touch still only activates for the blue player, even though both of them are mapped to the same input.

    Can anyone help? Appreciated.
     

    Attached Files: