| 1111 | } |
| 1112 | |
| 1113 | void Input::action_release(const StringName &p_action) { |
| 1114 | ERR_FAIL_COND_MSG(!InputMap::get_singleton()->has_action(p_action), InputMap::get_singleton()->suggest_actions(p_action)); |
| 1115 | |
| 1116 | // Create or retrieve existing action. |
| 1117 | ActionState &action_state = action_states[p_action]; |
| 1118 | action_state.cache.pressed = false; |
| 1119 | action_state.cache.strength = 0.0; |
| 1120 | action_state.cache.raw_strength = 0.0; |
| 1121 | // As input may come in part way through a physics tick, the earliest we can react to it is the next physics tick. |
| 1122 | action_state.released_event_id = ObjectID(); |
| 1123 | action_state.released_physics_frame = Engine::get_singleton()->get_physics_frames() + 1; |
| 1124 | action_state.released_process_frame = Engine::get_singleton()->get_process_frames(); |
| 1125 | action_state.device_states.clear(); |
| 1126 | action_state.exact = true; |
| 1127 | action_state.api_pressed = false; |
| 1128 | action_state.api_strength = 0.0; |
| 1129 | } |
| 1130 | |
| 1131 | void Input::set_emulate_touch_from_mouse(bool p_emulate) { |
| 1132 | emulate_touch_from_mouse = p_emulate; |
no test coverage detected