GiL, using the default controller that come with unity, called First Person Controller, is it possible to create a joystick hud either using ork or makinom and make it work?
  • The only way I see to do this is to replace the input used by the controller with ORK/Makinom input keys (which are changed by the virtual controls from control HUDs).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 2018
    If it's not too much work, do you think you can show me how? :)

    I know that in the first person controller script, this is the input used by it.
    float horizontal = CrossPlatformInputManager.GetAxis ("Horizontal");
    float vertical = CrossPlatformInputManager.GetAxis ("Vertical");
    I instead need to do it similar to this, right?
    float horizontal = ork/makinom.input("Horizontal");

    How do I get makinom/ork input to connect to it?
    Post edited by Shadow_Fire on
  • In ORK:
    float horizontal = ORK.InputKeys.Get(id).GetAxis();
    id is the ID/index of the input key in the editor.

    In Makinom:
    float horizontal = Maki.InputKeys.Get(id).GetAxis(Maki.Control.InputID);
    Again, id is the ID/index of the input key in the editor.
    The difference here is that the GetAxis (and GetButton) functions require an input ID, since Makinom allows defining different inputs for input IDs, e.g. for local multiplayer or different control schemes. Using Maki.Control.InputID is usually the correct way here to get the current input ID that is used :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 2018
    Nice! That went smoothly. Thanks a lot.
    Now I'm just confused on the virtual joystick part.
    Here is what my joystick setting looks like.

    https://www.dropbox.com/s/dchgngc4iuvoqxj/joystick1.PNG?dl=0
    https://www.dropbox.com/s/31o63e1icqn0cz2/joystick2.PNG?dl=0
    https://www.dropbox.com/s/kw498b45qcfdpej/joystick3.PNG?dl=0

    The big grey box is the gui. The small gray box is the element setting show box. The big white circle is the background image of the element box. The small circle is the button image of the axis setting.

    The problem is that if I click in the middle of the button image(the small circle), the circle will automatically go to the bottom right, making my character go back. I will have to drag it all the way up to make it go forward. It seems like it's not accurate at all. Do you know why?
    Post edited by Shadow_Fire on
  • I think you should change the axis center to X=50, Y=50 to place it in the middle of your element (since you're using Is Percent (Center)).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Ahh everything is clear now. Whoot!
    One last question and I'm happy with my virtual control. Is it possible with makinom joystick to make the movement to not go full speed if I only move the joystick a small amount? Of course, when the joystick is at it's furthest, then the character will move at it's normal speed.
  • That should depend on your control scripts - the virtual control creates input values just like a regular joystick, e.g. 0.5 when moving it halfway upwards.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.