diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 550933ce64..7a17df2c9e 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -398,6 +398,9 @@ The inertia to use when panning in the 3D editor. Higher values make the camera start and stop slower, which looks smoother but adds latency. + + The mouse sensitivity to use when panning in the 3D editor. + The inertia to use when zooming in the 3D editor. Higher values make the camera start and stop slower, which looks smoother but adds latency. diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 153cb74b74..7322e2aefb 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -827,7 +827,8 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { _initial_set("editors/3d/navigation/warped_mouse_panning", true, true); // 3D: Navigation feel - EDITOR_SETTING_BASIC(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/orbit_sensitivity", 0.25, "0.01,2,0.001") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/orbit_sensitivity", 0.25, "0.01,20,0.001") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/translation_sensitivity", 1.0, "0.01,20,0.001") EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/orbit_inertia", 0.0, "0,1,0.001") EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/translation_inertia", 0.05, "0,1,0.001") EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/zoom_inertia", 0.05, "0,1,0.001") diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 5d11cc7bc5..e5cffbd41e 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -2501,8 +2501,9 @@ Node3DEditorViewport::NavigationMode Node3DEditorViewport::_get_nav_mode_from_sh void Node3DEditorViewport::_nav_pan(Ref p_event, const Vector2 &p_relative) { const NavigationScheme nav_scheme = (NavigationScheme)EDITOR_GET("editors/3d/navigation/navigation_scheme").operator int(); + const real_t translation_sensitivity = EDITOR_GET("editors/3d/navigation_feel/translation_sensitivity"); - real_t pan_speed = 1 / 150.0; + real_t pan_speed = translation_sensitivity / 150.0; if (p_event.is_valid() && nav_scheme == NAVIGATION_MAYA && p_event->is_shift_pressed()) { pan_speed *= 10; }