mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Enable snapping when control key pressed
This commit is contained in:
parent
b2412c72a0
commit
24c170555d
2 changed files with 5 additions and 1 deletions
|
|
@ -4691,6 +4691,8 @@ void SpatialEditor::_unhandled_key_input(Ref<InputEvent> p_event) {
|
|||
if (!is_visible_in_tree() || get_viewport()->gui_has_modal_stack())
|
||||
return;
|
||||
|
||||
snap_key_enabled = Input::get_singleton()->is_key_pressed(KEY_CONTROL);
|
||||
|
||||
Ref<InputEventKey> k = p_event;
|
||||
|
||||
if (k.is_valid()) {
|
||||
|
|
@ -4962,6 +4964,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
|
|||
editor_selection->add_editor_plugin(this);
|
||||
|
||||
snap_enabled = false;
|
||||
snap_key_enabled = false;
|
||||
tool_mode = TOOL_MODE_SELECT;
|
||||
|
||||
hbc_menu = memnew(HBoxContainer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue