Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Bug On screen controls working for one gameobject only

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

  1. deathkill781


    Jun 3, 2021
    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:
    However, when I try to do the same for the green character, he just doesn't move:
    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:
    And here is the one for the blue player:
    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: