Page 1 of 1

Keyboard/controller only input

Posted: Mon Nov 05, 2018 10:19 am
by shredingskin
Hello, I am having trouble using the defaultUI scrolling with only wasd keys.
What is the way to achieve this ?
Also, stopping mouse0 to select conversations.
Many thanks !

Re: Keyboard/controller only input

Posted: Mon Nov 05, 2018 10:32 am
by Tony Li
Hi,

First make sure the basics are set. Inspect the Dialogue Manager's Input Device Manager and set these values:
  • Input Mode: Keyboard
  • Always Auto Focus: ticked
  • Detect Mouse Control: UNticked
By "stopping mouse0 to select conversations" do you mean starting a conversation, or selecting responses once the conversation has started? If you mean starting a conversation, how are you starting it? Are you using Selector / ProximitySelector? If so, change the Use Key and/or Use Button.

To scroll with the keyboard or joystick, use the script in this forum post or grab the ScrollToMe.cs script from the Dialogue System Menu Framework on the Dialogue System Extras page. Add ScrollToMe to your response button template.

Re: Keyboard/controller only input

Posted: Mon Nov 05, 2018 10:42 am
by shredingskin
Oh I was using an old dialogue manager prefab (from before v2) and I did't had the input manager, thank you !

Re: Keyboard/controller only input

Posted: Mon Nov 05, 2018 11:03 am
by shredingskin
The scrollToMe works like a charm, but I noticed it still working (scrolling) while the game is paused (I'm using Adventure creator, so I've set the dialogue timemode to gameplay).

About the mouse button, it's that even though my mouse is hidden by adventure creator, I can still "select" dialogue responses (well, they hover, but the selected one is still the one highlighted by the keyboard).

Re: Keyboard/controller only input

Posted: Mon Nov 05, 2018 12:40 pm
by Tony Li
That's controlled by Unity UI. Here are two ideas:

1. Deactivate the Canvas's Graphic Raycaster.

2. Or add a (transparent) full-screen background to your AC pause menu. Tick Raycast Target. This will block canvases that are underneath it, such as the Dialogue Manager's Canvas.