Merge pull request #115002 from ryevdokimov/orbit-snap-require-shortcut
Fix viewport orbit snap defaulting to always snapping when shortcut(s) are set to none
This commit is contained in:
commit
fb9711a19a
1 changed files with 3 additions and 2 deletions
|
|
@ -2894,8 +2894,9 @@ void Node3DEditorViewport::_nav_orbit(Ref<InputEventWithModifiers> p_event, cons
|
|||
cursor.x_rot = cursor.unsnapped_x_rot;
|
||||
cursor.y_rot = cursor.unsnapped_y_rot;
|
||||
|
||||
if (_is_nav_modifier_pressed("spatial_editor/viewport_orbit_snap_modifier_1") &&
|
||||
_is_nav_modifier_pressed("spatial_editor/viewport_orbit_snap_modifier_2")) {
|
||||
bool snap_modifier_configured = !_is_shortcut_empty("spatial_editor/viewport_orbit_snap_modifier_1") || !_is_shortcut_empty("spatial_editor/viewport_orbit_snap_modifier_2");
|
||||
|
||||
if (snap_modifier_configured && _is_nav_modifier_pressed("spatial_editor/viewport_orbit_snap_modifier_1") && _is_nav_modifier_pressed("spatial_editor/viewport_orbit_snap_modifier_2")) {
|
||||
const real_t snap_angle = Math::deg_to_rad(45.0);
|
||||
const real_t snap_threshold = Math::deg_to_rad((real_t)EDITOR_GET("editors/3d/navigation_feel/angle_snap_threshold"));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue