Response menu inverted

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
fyperia
Posts: 13
Joined: Sat Jul 25, 2020 8:16 pm

Response menu inverted

Post 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!
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Response menu inverted

Post 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.
fyperia
Posts: 13
Joined: Sat Jul 25, 2020 8:16 pm

Re: Response menu inverted

Post by fyperia »

It's only the dialogue response menu. My other UI buttons work as expected.
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Response menu inverted

Post by Tony Li »

Hi,

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

responseMenuNav.png
responseMenuNav.png (149.68 KiB) Viewed 1011 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?
fyperia
Posts: 13
Joined: Sat Jul 25, 2020 8:16 pm

Re: Response menu inverted

Post by fyperia »

The navigation looks correct but the input itself is inverted. I sent it over in an email just now.
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Response menu inverted

Post 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.
nicmar
Posts: 133
Joined: Wed Aug 21, 2019 2:39 am

Re: Response menu inverted

Post 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! :)
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Response menu inverted

Post 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.
nicmar
Posts: 133
Joined: Wed Aug 21, 2019 2:39 am

Re: Response menu inverted

Post by nicmar »

Very interesting, I didn't have a RewiredStandaloneInputModule, just the standard one, so i'll definitely have a look.

Thank you!
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Response menu inverted

Post by Tony Li »

Glad to help!
Post Reply