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.
Comments
Hotspot then interaction is a totally new concept to me, is there a tutorial on setting that up?
The 2D Demo is an example of Choose Hotspot Then Interaction mode in action.
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.
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!
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
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.
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.
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.
Thank you so much for your continued patience and help!