Forum rules - please read before posting.

InteractionA working for hot spots but not UI elements

Hi, I'm using InteractionA to use an xbox controller button in place of the mouse. It is working fine for hot spots, but doesn't seem to effect UI elements. The UI elements are in worldspace and work fine with the mouse, and other x box controls are working a-ok and I'm using 1.47b. Any advice would be appreciated, thanks.

Comments

  • So got another work around, used this answer


    Only thing I had to tweak was the X/Y coordinates for the mouse, had to switch them from int to float. If anyone wants the updated scripts let me know at hi[at]tsrct.co, as I can't post them all here as its too long
  • actually above fix doesn't work in build despite tweaks, basically every time i use it it turns the character incrementally, so chris if you've got a fix for getting UI worldspace to recognise interaction A that would be awesome. Love your work by the way this platform is amazing.
  • If you have any Menu that uses Unity UI, AC will generate a "generic" EventSystem GameObject to handle clicks / presses.  This is just the Unity standard EventSystem, that uses "Submit" as the button to press.

    You can either create a duplicate input axis named "Submit" and tie it to the same XBox button, or create a new EventSystem prefab that uses "InteractionA" instead, and assign it in the Menu Manager for AC to generate.
  • Hi Chris,

    I've tied both methods and it still doesn't seem to be working. I've tried even using the return button, with the Submit axis and normal event system and that doesn't appear to be working either. Any ideas? Could be in the way I'm using worldspace canvas though I'm not sure. I've tested it in a clean build with no world space and it works fine.
  • Is your UI an asset file or a GameObject within the scene?  Try placing it in the scene outside of gameplay, then registering it in the Menu's properties box and changing the "Source" to "Unity Ui In Scene", rather than "Unity Ui In Prefab".
  • Hey Chris thanks for writing back, I'm actually already using unity UI in scene game objects (and marked/lined appropriately in menu manager). As an experiment I tried it with UI prefabs and it's still not working. I'm pretty stumped at this point.
  • edited September 2015
     
  • So it's simply the "World Space" setting that's causing the problem? 
    It's not clear if this is a general issue with World Space UIs, or
    because of the special case of this needing InteractionA rather than
    Submit.  I'm having trouble figuring out why this would be the case at
    all - does it respond to the "Submit" input button?
  • No it's really strange, interactionA and submit, event system set up properly and yeah just the world space. Last thing I will try is a whole new build with world space UI set up and see if I can replicate it. Pretty out of ideas, though working on the most trainwreck of a hack till I figure it out (simulate mouseclick, pretty messy).

    Thanks so much for your help, I'll let you know how I go with a fresh build.
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.