Controller Support

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
MrQuaid
Posts: 7
Joined: Tue Jul 17, 2018 12:49 am

Controller Support

Post by MrQuaid »

Recently purchased this system to go with Invector's 3rd person controller and I can't seem to get the Input Device Manager to recognize any axis's. I added the inputs via the add input definitions and added in joystick axes to check but nothing. I have it recognizing the B button on my controller but when I press it in game the Input Device manager cycles between mouse and joypad. My goal is to get the dialogue response buttons to move by controller input. Am I doing something wrong?
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Controller Support

Post by Tony Li »

Hi,

Are there any warnings or errors in the Console window? (Or output log if you're playing a build.)

Are the joystick axis input definitions looking at the joystick axes that you're moving?

If you move the mouse or click it, the Input Device Manager will switch back to mouse mode. You can turn this off by unticking the option on the Input Device Manager.

Do you know what kind of dialogue UI you're using? Are you using the Dialogue Manager prefab from the Plugins / Pixel Crushers / Dialogue System / Prefabs folder? If so, it's a Standard Dialogue UI. If you're using the older Unity UI Dialogue UI component, please inspect it and tick the Auto Focus checkbox.

Invector released a new version yesterday. When I get back into the office later today, I'll check it with the integration.
MrQuaid
Posts: 7
Joined: Tue Jul 17, 2018 12:49 am

Re: Controller Support

Post by MrQuaid »

Hi no console warnings at all. The inputs are all set up right from what I can tell. The b button on my controller is being recognized as cancel or escape but that’s it. I did manually check auto focus on every place I found. I even created a new project with just the third person controller and dialogue and in you test scene the controller will only start the conversation, can’t press a button to continue the conversation. Mouse and keyboard works fine just not recognizing most of the controller.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Controller Support

Post by Tony Li »

Thank for the info. As soon as I'm back in the office later today, I'll check it out.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Controller Support

Post by Tony Li »

Sorry for the delayed answer. Long day. :-)

A short answer:
  • Inspect the EventSystem GameObject, Set Horizontal Axis to "D-Pad Horizontal", and set Vertical Axis to "D-Pad Vertical" (both without quotes).
  • Select menu item Edit > Project Settings > Input, inspect Submit, and set Positive Button to "joystick button 0" (without quotes).
Details:

Since Invector is a Complete Project asset, it redefines the project's input settings. In particular, it remaps the Horizontal and Vertical inputs only to WASD. It also defines axes for the D-pad.

By default, the Unity UI EventSystem reads the Horizontal and Vertical inputs for navigation. The short answer above just tells the EventSystem to read the D-Pad axes instead.

Invector also remaps Submit only to the Return key. The short answer above also re-adds the mapping to the controller's A button.

If you don't want to use these mappings, you can always define different ones in Edit > Project Settings > Input, and specify those inputs in the EventSystem. You can define multiple inputs with the same name. For example, you could define multiple "UI Vertical" inputs that read from the keys 'W' and 'S', the joystick Y-axis (left stick), the 5th axis (right stick), and the 7th axis (D-pad). Then tell the EventSystem to use "UI Vertical".
MrQuaid
Posts: 7
Joined: Tue Jul 17, 2018 12:49 am

Re: Controller Support

Post by MrQuaid »

Thanks, with that detailed post I was able to get it working in a few minutes. I appreciate the speedy follow up. Only getting started with this package, but its great so far. Thanks again.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Controller Support

Post by Tony Li »

Glad to help!
doku95
Posts: 1
Joined: Mon Jan 13, 2020 11:52 am

Re: Controller Support

Post by doku95 »

For me it still does not work. :(
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Controller Support

Post by Tony Li »

@doku95 - Are you using Invector? If so, have you imported the Invector Support package from the latest version of the Dialogue System? Did you use the steps above to set up the inputs? Does your scene have an EventSystem?
Post Reply