Disable blender-style tranforms in freelook.

It's common to bind instant_scale to s, which conflicts with WASD
bindings in freelook mode.

Fixes #58502.
This commit is contained in:
Ryan Roden-Corrent 2022-03-05 14:57:51 -05:00
parent ff65d33e8c
commit 34b87772b4
No known key found for this signature in database
GPG Key ID: 435D8B10692555C9

View File

@ -2037,6 +2037,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
if (ED_IS_SHORTCUT("spatial_editor/cancel_transform", p_event) && _edit.mode != TRANSFORM_NONE) { if (ED_IS_SHORTCUT("spatial_editor/cancel_transform", p_event) && _edit.mode != TRANSFORM_NONE) {
cancel_transform(); cancel_transform();
} }
if (!is_freelook_active()) {
if (ED_IS_SHORTCUT("spatial_editor/instant_translate", p_event)) { if (ED_IS_SHORTCUT("spatial_editor/instant_translate", p_event)) {
begin_transform(TRANSFORM_TRANSLATE, true); begin_transform(TRANSFORM_TRANSLATE, true);
} }
@ -2046,6 +2047,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
if (ED_IS_SHORTCUT("spatial_editor/instant_scale", p_event)) { if (ED_IS_SHORTCUT("spatial_editor/instant_scale", p_event)) {
begin_transform(TRANSFORM_SCALE, true); begin_transform(TRANSFORM_SCALE, true);
} }
}
// Freelook doesn't work in orthogonal mode. // Freelook doesn't work in orthogonal mode.
if (!orthogonal && ED_IS_SHORTCUT("spatial_editor/freelook_toggle", p_event)) { if (!orthogonal && ED_IS_SHORTCUT("spatial_editor/freelook_toggle", p_event)) {