Merge pull request #64070 from Calinou/3d-editor-remove-alt-fov-adjustment
This commit is contained in:
commit
76391a091e
1 changed files with 6 additions and 14 deletions
|
@ -1386,25 +1386,17 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
|
||||||
const real_t zoom_factor = 1 + (ZOOM_FREELOOK_MULTIPLIER - 1) * b->get_factor();
|
const real_t zoom_factor = 1 + (ZOOM_FREELOOK_MULTIPLIER - 1) * b->get_factor();
|
||||||
switch (b->get_button_index()) {
|
switch (b->get_button_index()) {
|
||||||
case MouseButton::WHEEL_UP: {
|
case MouseButton::WHEEL_UP: {
|
||||||
if (b->is_alt_pressed()) {
|
if (is_freelook_active()) {
|
||||||
scale_fov(-0.05);
|
scale_freelook_speed(zoom_factor);
|
||||||
} else {
|
} else {
|
||||||
if (is_freelook_active()) {
|
scale_cursor_distance(1.0 / zoom_factor);
|
||||||
scale_freelook_speed(zoom_factor);
|
|
||||||
} else {
|
|
||||||
scale_cursor_distance(1.0 / zoom_factor);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case MouseButton::WHEEL_DOWN: {
|
case MouseButton::WHEEL_DOWN: {
|
||||||
if (b->is_alt_pressed()) {
|
if (is_freelook_active()) {
|
||||||
scale_fov(0.05);
|
scale_freelook_speed(1.0 / zoom_factor);
|
||||||
} else {
|
} else {
|
||||||
if (is_freelook_active()) {
|
scale_cursor_distance(zoom_factor);
|
||||||
scale_freelook_speed(1.0 / zoom_factor);
|
|
||||||
} else {
|
|
||||||
scale_cursor_distance(zoom_factor);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case MouseButton::RIGHT: {
|
case MouseButton::RIGHT: {
|
||||||
|
|
Loading…
Reference in a new issue