Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Movable input joystick

Discussion in 'Getting Started' started by Green11001, Oct 19, 2021.

  1. Green11001

    Green11001

    Joined:
    Apr 14, 2018
    Posts:
    397
    Hi, I have a joystick ui that I want to move to where the player clicks/taps. For instance if the player taps in the middle of the screen the joystick should move there and then the input should still register accordingly.
    I found this for moving ui objects
    https://answers.unity.com/questions/849117/46-ui-image-follow-mouse-position.html
    However, after moving the ui the joystick input ceases to work until the player presses again. The stick appears completely frozen, but on the second press it works as normal on the new location. This issue seems to only occur when the joystick is moved a significant distance away, so I suspect it may have something to do with where the movement range of the stick is, but I have no idea how to test it, or fix it.
     
  2. Green11001

    Green11001

    Joined:
    Apr 14, 2018
    Posts:
    397
    Anyone? Or at this point, should I just find a way to implement the joystick itself and ditch the input system one?
     
  3. Green11001

    Green11001

    Joined:
    Apr 14, 2018
    Posts:
    397
    I tried to mess around with enabling and disabling the joystick but I just can't figure out how to get it tracking from the new position. At this point, I'm ready to give up and think its not possible. Anyone know how I can make a custom joystick give input to the input system? Or do I just have to redo all my bindings tied to the input system?