Forum rules - please read before posting.

Controller setup

I'm trying to add controller support to my game (option to switch between the two) - it's all good for the most part. Just have a couple questions :

Video reference :

1. When I select an inventory object, then close the menu the object is attached to the mouse. Obviously this is not needed. Although it would be nice to see on screen what is currently equipped. I would prefer for it to be in a specific spot on screen.

2. In order to use the controller the inventory has to be paused. I had a thought about scrolling through the menu with the d-pad instead of the joystick so the game wouldn't have to pause? The would be especially important as I'm not sure how to change a menu property (from pause to unpause on active) depending on if it's mouse/keyboard or controller active. 


  • Scratch that - after further consideration I want to walk up to the hotspot (player vicinity) then be able to choose examine or choose inventory object. 

    Hotspot then interaction is a totally new concept to me, is there a tutorial on setting that up?
  • edited May 2016
    Okay - update - I've found the 'walking dead' menu setup. Which has helped a lot. I feel like I'm close, but the radial menu instantly disappears when I touch the hotspot. Must be missing something. 

    I have the cycle left and right assigned as well.

  • I can now get the menu to stay up - but I can't seem to figure out how to actually select an interaction with the controller.
  • edited May 2016
    Are you set to Select interactions by: "Cycling menu and clicking hotspot" 

    Then set up an input for CycleInteractions or the Cycle L/R and set up your controller inputs appropriately?

    I have a very similar setup and am also still having some issues - but did manage to get interactions opening and selecting.

    Nice looking game!
  • The various Interaction settings in your Settings Manager, and properties of the Interaction menu, are going to be key to this.  Please provide screenshots of those.

    The 2D Demo is an example of Choose Hotspot Then Interaction mode in action.

  • Here you go - sorry about that. The interaction menu is literally copied from the walking dead setup.

    My goal is to be able to walk up to a hotspot w/o button press - and cycle through the interaction options. (talk to, examine, inventory object)

    I still have the same issue where the menu pops up and immediately closes. 


  • And the Interactions Menu?  Have you defined the inputs that @dxmachina mentioned?  They should be listed in the "Available inputs" boxed in the Settings Manager.

    As controller input adds an extra layer of complexity, temporarily switch to Mouse And Keyboard input and let's focus on keyboard first.
  • Hi Chris/Eric! I'm curious if there's been any development here, because I'm experiencing a similar issue with the Walking Dead UI's interaction ring appearing/disappearing whenever you get close enough to make it appear in Direct Control mode.

    For further reference, I've added the CycleInteractions to the Input Manager and copied the Interface settings recommended above (Keyboard and Mouse for simplicity, Choose Hotspot then Interaction, Cycling Menu and Clicking Hotspot, Cursor Over Hotspot). The result is that the interaction ring DOES appear properly, but I can't select anything from it -- probably because I haven't configured the inputs properly for this setup.

    However, switching to Keyboard/Controller makes the interaction ring appear/disappear immediately when you collide with its hotspot. Pressing the "submit" key will make the ring appear briefly, but selecting an option is not possible
  • edited June 2016
    Check that Ignore cursor clicks? is unchecked.  If you're using buttons to select the Interactions, and not the mouse, then you don't want the mouse position to interfere with the Interaction menu.
  • Hi Chris! "Ignore Cursor Clicks?" was unchecked in the Interaction menu settings -- and checking that box seemed to fix the issue!

    I'm still getting my feet wet with a test project so I'm sure I'll have more questions down the line. I want to thank you not just for this amazing tool, but for the incredibly useful tutorials and the help you provide to burgeoning adventure creators here!
  • No problem @tdcpresents!  Reviews are always welcome on the Asset Store, if you'd like to leave one.
  • Thanks for reminding me! Done and done! Quick follow-up question, though I'm sure if I fiddle around I could figure this out myself eventually.

    I'm trying to set up my 2D game with Telltale style gamepad controls, with a cursor controlled by the right analog stick, and the face buttons selecting inputs. I can't quite seem to figure out the following:

    A.) How to actually get a cursor to appear that's controlled by the right analog stick
    B.) How to set the interactions so they're controlled by face buttons on a gamepad

    Any help would be greatly appreciated! 
  • Once your Input method is set to Keyboard Or Controller, you can control the cursor using inputs named CursorHorizontal and CursorVertical - see Section 2.8 of the Manual.

    Buttons and Interactions defined in the Menu Manger have an Alternative input button property, that allow you to name an input that triggers it instantly (i.e. without having to scroll/select the button as normal).  Create inputs for each of the gamepad face buttons, and then enter them into the Interaction Menu's element properties.
  • Check out this page for the names of buttons and axes on a standard gamepad.

    Find the ones you need and add them in Unity's Input manager. For instance, the A button on an Xbox controller is "joystick button 0". If you add that to Submit and/or InteractionA you can use the A button to trigger hotspots etc.
  • edited June 2016
    Thanks Chris/Hedgefield! Progress! :D

    I'm actually using a PS4 controller (easier compatibility with the Mac) and managed to get the mappings correct there. So now I've got a cursor that I can navigate on screen with the right analog stick, but there are a few additional issues I've yet to work around.

    With the hotspot selected and the interaction ring open, I'm only able to select an option with InteractionA after highlighting it (and Use seems to be selected by default). I experimented with the Alternative Input Button properties, but setting the buttons in those fields for Use and Look doesn't appear to have any effect (joystick button 1 and 2 on the PS4 controller should map to X and O, respectively). Just to cover my bases, I tried it with both the button map and the input name (ie "joystick button 1" and "InteractionA" and neither seemed to work.

    I've been able to work around this for the time being by setting CycleInteractions, but that only toggles the interactions and select the highlighted one with InteractionA instead of allowing me to map them to the face buttons.
  • You want to map it to the input name, not button name.  As InteractionA will conflict with other uses, use a new input to test with, e.g. "XButton", mapped to a joystick button.

    To check that the input is working, try creating an Active input that causes the game to quit when your input to test is pressed.  You can read more about them in Section 2.14 of the Manual.
  • The button itself is registering when I test it with an Active Input that exits the game, which is a relief -- but setting that same input name into the "Alternative input button" field for the "Look" interaction element did not result in anything happening when I hovered over the Hotspot and brought up the interaction ring. 

    BTW, minor cosmetic bug, it's misspelled as "Alernative" in the editor.
  • It works for me when entering input names into the 2D Demo's Interaction menu.  So that we're both working from the same base, load the 2D Demo's Managers from the top toolbar and try modifying the Menu Manager there - then run the Park demo scene to see if you can get it working there first.
  • After testing it out in the 2D Demo, I discovered that the Alternative Menu Input works correctly if you set your "Select Interactions" to "Clicking Menu" (I'd had mine set to Cycling Menu and Clicking Hotspot previously). Now I can hover over a hotspot and use the assigned face buttons to select the items. Thank you so much!

    Quick follow-up question -- the cursor still highlights the available options in the interaction ring when I navigate it over them, even though they're not selectable without pressing the assigned alternative menu input button. Examining the elements in the Menu settings, it looks like those strings are baked in to some degree. Is it possible to hide the text from appearing when you move the cursor over the interaction elements?

    Thank you so much for your continued patience and help!
  • It is - underneath Hotspot settings in the Cursor Manager, uncheck Prefix cursor labels?.
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.