Search Unity

How to make a onscreen JoyStick that operates according to mouse inputsand movements?

Discussion in 'Getting Started' started by aksh2143, Oct 13, 2015.

?

How to make a onscreen JoyStick that operates according to mouse inputsand movements?

  1. Possible

    1 vote(s)
    100.0%
  2. NOtPossible

    0 vote(s)
    0.0%
Multiple votes are allowed.
  1. aksh2143

    aksh2143

    Joined:
    Jul 6, 2015
    Posts:
    10
    i am trying to make an onscreen joyStick. For that i searches many examples but they all were on input touches ans what i wanted was according to mouse position and inputs like i this image. Any one have code here? _/\_
     

    Attached Files:

  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,647
    Almost any of those onscreen virtual joysticks designed for touches ought to work with mouse movements as well. It's possible you may have to tweak the code a bit to make use of mouse events rather than touch events, but this is a fairly minor change.

    You don't see this much because it's a horrible UI. But it's entirely possible.
     
  3. aksh2143

    aksh2143

    Joined:
    Jul 6, 2015
    Posts:
    10
    So any reference from you (@JoeStrout ) ?
     
unityunity