You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Merge pull request #95154 from jsjtxietian/quit-freelook
Fix Pressing Escape doesn't exit freelook in the 3D editor
This commit is contained in:
@@ -2254,6 +2254,11 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
|
||||
}
|
||||
|
||||
if (_edit.mode == TRANSFORM_NONE) {
|
||||
if (_edit.gizmo.is_null() && is_freelook_active() && k->get_keycode() == Key::ESCAPE) {
|
||||
set_freelook_active(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_edit.gizmo.is_valid() && (k->get_keycode() == Key::ESCAPE || k->get_keycode() == Key::BACKSPACE)) {
|
||||
// Restore.
|
||||
_edit.gizmo->commit_handle(_edit.gizmo_handle, _edit.gizmo_handle_secondary, _edit.gizmo_initial_value, true);
|
||||
|
||||
Reference in New Issue
Block a user