Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions editor/scene/3d/node_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2995,6 +2995,11 @@ void Node3DEditorViewport::_cursor_interpolated() {
spatial_editor->update_grid();
}

void Node3DEditorViewport::_cursor_distance_scaled() {
zoom_indicator_delay = ZOOM_FREELOOK_INDICATOR_DELAY_S;
surface->queue_redraw();
}

void Node3DEditorViewport::_freelook_changed() {
spatial_editor->set_freelook_viewport(view_3d_controller->is_freelook_enabled() ? this : nullptr);
}
Expand Down Expand Up @@ -7052,6 +7057,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
view_3d_controller->connect("freelook_speed_scaled", callable_mp(this, &Node3DEditorViewport::_freelook_speed_scaled));
view_3d_controller->connect("cursor_panned", callable_mp(this, &Node3DEditorViewport::_disable_follow_mode));
view_3d_controller->connect("cursor_interpolated", callable_mp(this, &Node3DEditorViewport::_cursor_interpolated));
view_3d_controller->connect("cursor_distance_scaled", callable_mp(this, &Node3DEditorViewport::_cursor_distance_scaled));
_update_view_3d_controller(true);

_update_name();
Expand Down
1 change: 1 addition & 0 deletions editor/scene/3d/node_3d_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ class Node3DEditorViewport : public Control {
void _update_view_3d_controller(bool p_update_all = true);

void _cursor_interpolated();
void _cursor_distance_scaled();

void _freelook_changed();
void _freelook_speed_scaled();
Expand Down
3 changes: 3 additions & 0 deletions scene/debugger/view_3d_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,8 @@ void View3DController::scale_cursor_distance(const float p_scale) {
} else {
zoom_failed_attempts_count = 0;
}

emit_signal(SNAME("cursor_distance_scaled"));
}

void View3DController::set_shortcut(const ShortcutName p_name, const Ref<Shortcut> &p_shortcut) {
Expand Down Expand Up @@ -792,6 +794,7 @@ void View3DController::_bind_methods() {

ADD_SIGNAL(MethodInfo("cursor_panned"));
ADD_SIGNAL(MethodInfo("cursor_interpolated"));
ADD_SIGNAL(MethodInfo("cursor_distance_scaled"));
}

#endif // _3D_DISABLED
Loading