mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Split 3D editor sensitivity freelook sensitivity into its own setting
This allows configuring orbit sensitivity and freelook sensitivity independently from each other. Often, it's needed to use a lower freelook sensitivity compared to the orbit sensitivity. Also, when using a FOV scale lower than the default (using Alt + mouse wheel), the mouse sensitivity is now scaled to make it easier to use freelook to look at distant objects. This does not affect orbiting and panning.
This commit is contained in:
parent
0aa7768b1e
commit
d6e7308b3f
2 changed files with 4 additions and 1 deletions
|
@ -2253,7 +2253,8 @@ void SpatialEditorViewport::_nav_look(Ref<InputEventWithModifiers> p_event, cons
|
|||
_menu_option(VIEW_PERSPECTIVE);
|
||||
}
|
||||
|
||||
const real_t degrees_per_pixel = EditorSettings::get_singleton()->get("editors/3d/navigation_feel/orbit_sensitivity");
|
||||
// Scale mouse sensitivity with camera FOV scale when zoomed in to make it easier to point at things.
|
||||
const real_t degrees_per_pixel = real_t(EditorSettings::get_singleton()->get("editors/3d/freelook/freelook_sensitivity")) * MIN(1.0, cursor.fov_scale);
|
||||
const real_t radians_per_pixel = Math::deg2rad(degrees_per_pixel);
|
||||
const bool invert_y_axis = EditorSettings::get_singleton()->get("editors/3d/navigation/invert_y_axis");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue