Add Dead Zone to virtual input action for better usage with gamepad sticks/triggers

#3660
This commit is contained in:
Wojtek Figat
2026-03-10 19:58:50 +01:00
parent 3bbaa7025a
commit afc4d0f3d3
5 changed files with 131 additions and 44 deletions

View File

@@ -48,6 +48,12 @@ API_STRUCT() struct ActionConfig
/// </summary>
API_FIELD(Attributes="EditorOrder(40)")
InputGamepadIndex Gamepad;
/// <summary>
/// Threshold for non-binary value inputs such as gamepad stick position to decide if action was triggered. Can be sued to activate action only if input value is higher than specified number.
/// </summary>
API_FIELD(Attributes = "EditorOrder(50)")
float DeadZone = 0.5f;
};
/// <summary>