Overview
The following information is for projects that are set up using Unity's legacy input manager. From Unity 6.2 onwards, new projects will not include the legacy input manager and will only be set up to use the newer input system. The NeoFPS demos have been updated to use the input system instead of the input manager in Unity 6 and above from NeoFPS version 1.1.36
NeoFPS uses controller profiles to achieve consistent mapping for game controllers across multiple platforms. Since the button layouts provided to Unity by the various controller drivers are not consistent, NeoFPS requires every available axis to be mapped in the input settings and then builds the profiles in code using conditional compilation for the different platforms. Examples of the different controller mappings can be found on the Unify Community Wiki.
For more details of how Unity handles input out of the box, see the Unity Input Settings.
Required Axes
The following are the axes that NeoFPS uses:
Movement
| Properties |
| Name = Horizontal |
| Negative Button = left |
| Positive Button = right |
| Alt Negative Button = a |
| Alt Negative Button = d |
| Gravity = 3.0 |
| Dead = 0.001 |
| Sensitivity = 3.0 |
| Snap = true |
| Invert = false |
| Type = Key or Mouse Button |
| Properties |
| Name = Horizontal |
| Gravity = 0.0 |
| Dead = 0.3 |
| Sensitivity = 1.0 |
| Snap = false |
| Invert = false |
| Type = Joystick Axis |
| Axis = X Axis |
| Joy Num = Get Motion from all Joysticks |
| Properties |
| Name = Vertical |
| Negative Button = down |
| Positive Button = up |
| Alt Negative Button = s |
| Alt Negative Button = w |
| Gravity = 3.0 |
| Dead = 0.001 |
| Sensitivity = 3.0 |
| Snap = true |
| Invert = false |
| Type = Key or Mouse Button |
| Properties |
| Name = Vertical |
| Gravity = 0.0 |
| Dead = 0.3 |
| Sensitivity = 1.0 |
| Snap = false |
| Invert = true |
| Type = Joystick Axis |
| Axis = Y Axis |
| Joy Num = Get Motion from all Joysticks |
Mouse Controls
| Properties |
| Name = Mouse X |
| Gravity = 0.0 |
| Dead = 0.0 |
| Sensitivity = 0.1 |
| Snap = false |
| Invert = false |
| Type = Mouse Movement |
| Axis = X Axis |
| Properties |
| Name = Mouse Y |
| Gravity = 0.0 |
| Dead = 0.0 |
| Sensitivity = 0.1 |
| Snap = false |
| Invert = false |
| Type = Mouse Movement |
| Axis = Y Axis |
| Properties |
| Name = Mouse ScrollWheel |
| Gravity = 0.0 |
| Dead = 0.0 |
| Sensitivity = 0.1 |
| Snap = false |
| Invert = false |
| Type = Mouse Movement |
| Axis = 3rd Axis (Joysticks and Scrollwheel) |
UI
| Properties |
| Name = Submit |
| Positive Button = return |
| Alt Positive Button = enter |
| Gravity = 1000.0 |
| Dead = 0.001 |
| Sensitivity = 1000.0 |
| Snap = false |
| Invert = false |
| Type = Key or Mouse Button |
| Properties |
| Name = Submit |
| Positive Button = joystick button 0 |
| Alt Positive Button = joystick button 16 |
| Gravity = 1000.0 |
| Dead = 0.001 |
| Sensitivity = 1000.0 |
| Snap = false |
| Invert = false |
| Type = Key or Mouse Button |
| Properties |
| Name = Cancel |
| Positive Button = escape |
| Gravity = 1000.0 |
| Dead = 0.001 |
| Sensitivity = 1000.0 |
| Snap = false |
| Invert = false |
| Type = Key or Mouse Button |
Individual Axes
Axes 1 to 5 are mapped to generic axes with the names Gamepad Axis 1 to Gamepad Axis 5 and the following settings. The Axis property is set to the relevant entry (1-5).
| Properties |
| Gravity = 0.0 |
| Dead = 0.2 |
| Sensitivity = 1.0 |
| Snap = false |
| Type = Joystick Axis |
Each axis is also mapped with and inverted version called Gamepad AxisInv 1 to Gamepad AxisInv 5. As you would expect, the non-inverse axes have the invert property set to false, while the inverse axes have the property set to true.
Gamepad buttons are mapped with the names Gamepad Button 0 to Gamepad Button 19 and the following settings. The Positive Button property is set to joystick button , where is replaced with the corresponding button number.
| Properties |
| Gravity = 1000.0 |
| Dead = 0.001 |
| Sensitivity = 1000.0 |
| Snap = true |
| Invert = false |
| Type = Key or Mouse Button |
On some platforms, some controller buttons are actually presented as axes. To handle these cases the buttons are mapped with the names Gamepad AxisBtn 3 to Gamepad AxisBtn 10 with the following settings. The Axis property is set to the relevant entry (3-10).
| Properties |
| Gravity = 1000.0 |
| Dead = 0.001 |
| Sensitivity = 1000.0 |
| Snap = true |
| Invert = false |
| Type = Joystick Axis |
There are also 2 inverse button axes called Gamepad AxisBtnInv 6 and Gamepad AxisBtnInv 7 where the Invert property is set to true.
See Also
NeoFPS Input System
Unity Input Settings
Unify Community Wiki - Gamepads