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 have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

On-Screen Stick flickering between (0,0) and actual value

Discussion in 'Input System' started by Jepsiko, May 30, 2022.

  1. Jepsiko

    Jepsiko

    Joined:
    Jan 30, 2018
    Posts:
    1
    Hi!

    I am trying to use the new input system on my game to play it on mobile. I have created an UI Image with a On-Screen Stick component. I used the Vector2 for the control type and it seems to work perfectly in play mode but as soon as I try on my phone, the value is flickering between (0,0) and the actual value pointed by my finger.
    As you can see in the video, the value seems to be (0,0) whenever I move my finger.

    I was able to find the source of the problem, it seems that the context gets canceled on every move so I can check for it to being performed to actually get the right value but then when I stop touching the screen, the value stay the same (not 0,0 like I would like).

    Am I doing something wrong ? I didn't change the original On-Screen Stick script. Thanks

    bug input system.gif
     
    Last edited: May 30, 2022
  2. Rouliboudin

    Rouliboudin

    Joined:
    Jan 26, 2022
    Posts:
    3