Game Development Community

Setup an Controller

by Tsuki Nomisai · in Torque 3D Beginner · 04/16/2016 (1:29 pm) · 2 replies

I'm having some problems with setting up a controller using direct input.

I got all of the prefs defined, all of the buttons binded, and the trouble is remapping.

When I tried to remap the movement to the thumbsticks(on a xbox controller), nothing happened. So, I figured it was the deadzone values. What should the deadzone values be?

Secondly, I tried to remap one of the buttons, and the mapping failed. What am I doing wrong?

Third, is there a way to set a name to identify the buttons, thumbsticks, bumpers, etc. to something like(RStick, AButton,RBumper) when its showing what button it is than joystick0?

Ive tested it to see if it is being seen, and it is being seen.

#1
04/17/2016 (7:22 am)
There is a mapping table at about the middle of optionsDlg.cs that is used to create the table you see in the Options Dialog control mapping page. You will want to edit this to add mappings for the options page.

It maps the "action name" in the page to the actual function in defaultbinds.cs, allowing you to select these from the Options Dialog.

Additionally, the game generates a file - scripts/client/config.cs - which has the current binds from defaultbinds.cs in it. When editing defaultbinds.cs, ensure that you delete config.cs or you will not see your changes in-game.
#2
04/17/2016 (9:27 am)
Ah. Found the file!

Thanks!