Forum rules - please read before posting.

Joystick + touch screen?

Hi,
I wondered if it would be possible to use a real joystick controller and touch screen input at the same time for android? Because the character moves around using the joystick but there are buttons that have to be clicked on/pressed via the touch screen? But as far as I can see I can only have one or the other.

Thanks!

Comments

  • edited December 2018

    Touch-screen input relies on Unity's Input.GetTouch() API, so it's really a case of one-or-the-other. You can, however, change AC's Input method dynamically at runtime, e.g. by detecting the presence of a touch:

    void Update ()
    {
      bool useTouchInput = (Input.touchCount > 0);
      AC.KickStarter.settingsManager.inputMethod == (useTouchInput)
                                                ? AC.InputMethod.TouchScreen
                                                : AC.InputMethod.KeyboardOrController;
    }
    

    Any AC Manager field can be changed at runtime - right-click on its field label to get an API reference to it.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.