Forum rules - please read before posting.

Input on menu problem

Hi
I have a menu that acts as a virtual game pad, using the simulate input feature
It works fine but the issue is it will only accept 1 touch input at a time
So if I press up and press left at the same time, or slide the cursor to a different input button, it stops instead of doing both
Is there a way for fix this?

Comments

  • edited October 2019

    For a menu to respond to multiple touches simultaneously, it must be rendered with Unity UI. Is its Source field currently set to Adventure Creator?

  • Hi Chris
    I set it to unity UI, but it still wont take multiple touches. It just stops the current movement and responds to the new touch instead of doing both.
    This is what the AC button properties look like
    https://imgur.com/a/2NKr0VZ

  • edited October 2019

    Thanks for the details. The "Simulate Input" feature only works for one axis at a time, but you can also integrate the free Simple Touch Controller asset into AC.

    See this tutorial. This method does allow for simultaneous input.

  • edited October 2019

    Hi Chris,
    Thanks for that, got it to work on my phone with direct, input touch screen and custom input. I was originally using First Person but it doesn't work with that, is there a way to? Otherwise is there a way to change the movement method to direct, input to touch screen and direct movement to custom input on run time (i.e. only when the virtual pad is activated)?

  • I also seem to have an issue with not being able to move once I switch scenes
  • I was originally using First Person but it doesn't work with that, is there a way to?

    See the Manual's "Touch screen input" chapter - when combined with First Person movement, you'll get an additional First-person movement field in the Settings Manager. If you're using the script covered in the tutorial, this should likely be set to Custom Input.

    I also seem to have an issue with not being able to move once I switch scenes

    Any script/prefab associated with the controls will have to be present in every scene, or marked with DontDestroyOnLoad via a custom script.

  • Hi Chris, thanks the first bit works
    The joystick not working when i switch scenes is still a problem though
    https://imgur.com/a/kve2fO9

  • Is the Joystick UI still present after the scene change, only that it's unresponsive?

    I shall attempt a recreation.

  • This seems to be an issue with the Simple Touch Controller itself.

    Make the joystick a prefab, and place an instance of the prefab in each scene - instead of making it survive scene changes. You'll need to have an EventSystem present as well for it to be responsive.

  • Hi Chris,
    Thanks for that, it works. Small issue, it doesn't seem to be using AC's turn values now? Now when I move the joystick it spins around pretty fast whereas before we did this it turned pretty slow, like how it turns normally without the joystick

  • I also had a "touch screen to continue" on start up and it doesn't work anymore
  • Small issue, it doesn't seem to be using AC's turn values now?

    What turn value specifically are you referring to, and what code are you using?

    I also had a "touch screen to continue" on start up and it doesn't work anymore

    I don't know anything about that - that's not an AC feature.

  • edited October 2019

    Hi Chris,
    I fixed that bit myself don't worry
    And my turn value I mean in the Player component movement turn value

  • Again, though, what code are you using to connect the joystick with AC's input system?

  • Oh I'm not sorry, I thought it did with the custom AC script that was written in the tutorial
    How do I do that?

  • The tutorial only overrides the Horizontal and Vertical axes. I'm not clear if you're now using Direct or First Person movement, but turning in First Person involves free-aiming. A script that incorporates this with the Simple Touch Controller asset can be found on the AC wiki.

    Both scripts only read input directly from the controller. You can multiply these by some factor if desired, but I'd recommend trying it without any such script - and using AC on its own - to check that this isn't an unrelated problem.

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.
Do NOT follow this link or you will be banned from the site!