Add configurable strength value to InputEventAction

This commit is contained in:
Gilles Roudiere
2019-06-01 15:31:47 +02:00
parent 449395716f
commit f247832832
4 changed files with 21 additions and 1 deletions

View File

@@ -202,7 +202,7 @@ bool InputMap::event_get_action_status(const Ref<InputEvent> &p_event, const Str
if (p_pressed != NULL)
*p_pressed = input_event_action->is_pressed();
if (p_strength != NULL)
*p_strength = (*p_pressed) ? 1.0f : 0.0f;
*p_strength = (*p_pressed) ? input_event_action->get_strength() : 0.0f;
return input_event_action->get_action() == p_action;
}