Page 1 of 1

Response menu inverted

Posted: Fri Aug 07, 2020 3:42 pm
by fyperia
Hi,

When I select buttons in the response menu with my gamepad or keyboard, the input is inverted (pressing up goes down, down goes up.) I am using the new Input System. Adding a processor to invert all input isn't really an option for me (unless there's a way I'm not aware of to do it in code and have it only invert when in a dialogue menu), as doing so causes problems in other menus. Is there a way to reverse the display order of the buttons in the menu so the input doesn't need to be inverted?

TIA!

Re: Response menu inverted

Posted: Fri Aug 07, 2020 4:10 pm
by Tony Li
Hi,

It sounds like your vertical axis input is inverted. Does the same thing happen with non-Dialogue System UI buttons?

Also check the UI buttons' Navigation sections. You can click Visualize to see yellow arrows that will tell you how the navigation is set up.

Re: Response menu inverted

Posted: Fri Aug 07, 2020 9:58 pm
by fyperia
It's only the dialogue response menu. My other UI buttons work as expected.

Re: Response menu inverted

Posted: Fri Aug 07, 2020 10:17 pm
by Tony Li
Hi,

Does the navigation look correct? Here's an example:

responseMenuNav.png
responseMenuNav.png (149.68 KiB) Viewed 1008 times

Notice that Response 1's Select On Down goes to Response 2.

In the screenshot above, the Basic Standard Dialogue UI uses instantiated response buttons. If you've assigned design-time response buttons to the Buttons list instead, make sure they're added in the order you intend.

If that doesn't help, can you send a reproduction project to tony (at) pixelcrushers.com?

Re: Response menu inverted

Posted: Sat Aug 08, 2020 10:36 pm
by fyperia
The navigation looks correct but the input itself is inverted. I sent it over in an email just now.

Re: Response menu inverted

Posted: Sat Aug 08, 2020 11:11 pm
by Tony Li
Thanks for sending a copy of your project.

I think the colors may just be confusing. The Basic Standard Dialogue UI just uses some default Unity UI colors, but they were a poor choice in this context. The light gray color means the button is the current selection. The dark gray is for the other buttons that aren't currently selected. Try changing the Selected color of your response button template.

Re: Response menu inverted

Posted: Tue Jan 10, 2023 3:16 am
by nicmar
Hmm, i have the same or a similar problem. Moving the LS (Left Stick) UP/DOWN moves the selection incorrectly DOWN/UP. I have three options in my response menu, so it's easy to see.

When i use the keyboard WASD it does nothing, but Arrow keys UP/DOWN correctly move the selection UP/DOWN.

I see this code in StandardUIMenuPanel.cs:

Code: Select all

navigation.selectOnUp = above;
navigation.selectOnLeft = above;
navigation.selectOnDown = below;
navigation.selectOnRight = below;
The question is, why is LS-up sending navigation.selectOnDown?

I'm using Rewired, and it shows that moving LS UP shows positive Y-axis/Vertical.
Pressing Arrow up, also shows positive Y-axis/vertical.
Pressing W (as in WASD), also shows positive Y-axis/vertical.
This is used to move the player in the game, and Y axis positive moves any transform up, so it seems correct.

It seems Rewired isn't being used somehow in relation to the Dialogue System, but i'm having some troubles with one controller controlling the other in some cases.

Any ideas? :)

EDIT:
I also found this code related to our start menu with a note from one of our devs:

Code: Select all

//This is reverse for some reason.
continueButtonNavigation.selectOnUp = nextButton;
continueButtonNavigation.selectOnDown = previousButton;
This isn't using rewired either, so I'm curious if there is some setting in Unity that lets the default input system invert up/down, or if there is a way to use Rewired input in DS instead.

Thanks! :)

Re: Response menu inverted

Posted: Tue Jan 10, 2023 8:58 am
by Tony Li
Hi Niclas,

The response menu uses standard Unity UI navigation. Check your EventSystem GameObject. It should have a RewiredStandaloneInputModule. The RewiredStandaloneInputModule's Vertical axis controls up/down navigation. Typically it's assigned to an action named something like UIVertical. You may need to invert the input in the Rewired Input Manager editor window.

Re: Response menu inverted

Posted: Tue Jan 10, 2023 1:23 pm
by nicmar
Very interesting, I didn't have a RewiredStandaloneInputModule, just the standard one, so i'll definitely have a look.

Thank you!

Re: Response menu inverted

Posted: Tue Jan 10, 2023 1:36 pm
by Tony Li
Glad to help!