summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 4d7be66180..fcbca8ced0 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -2210,8 +2210,8 @@ void Node3DEditorViewport::set_freelook_active(bool active_now) {
}
void Node3DEditorViewport::scale_cursor_distance(real_t scale) {
- real_t min_distance = MAX(camera->get_znear() * 4, ZOOM_FREELOOK_MIN);
- real_t max_distance = MIN(camera->get_zfar() / 4, ZOOM_FREELOOK_MAX);
+ real_t min_distance = MAX(camera->get_near() * 4, ZOOM_FREELOOK_MIN);
+ real_t max_distance = MIN(camera->get_far() / 4, ZOOM_FREELOOK_MAX);
if (unlikely(min_distance > max_distance)) {
cursor.distance = (min_distance + max_distance) / 2;
} else {
@@ -2223,8 +2223,8 @@ void Node3DEditorViewport::scale_cursor_distance(real_t scale) {
}
void Node3DEditorViewport::scale_freelook_speed(real_t scale) {
- real_t min_speed = MAX(camera->get_znear() * 4, ZOOM_FREELOOK_MIN);
- real_t max_speed = MIN(camera->get_zfar() / 4, ZOOM_FREELOOK_MAX);
+ real_t min_speed = MAX(camera->get_near() * 4, ZOOM_FREELOOK_MIN);
+ real_t max_speed = MIN(camera->get_far() / 4, ZOOM_FREELOOK_MAX);
if (unlikely(min_speed > max_speed)) {
freelook_speed = (min_speed + max_speed) / 2;
} else {
@@ -2714,8 +2714,8 @@ void Node3DEditorViewport::_draw() {
if (is_freelook_active()) {
// Show speed
- real_t min_speed = MAX(camera->get_znear() * 4, ZOOM_FREELOOK_MIN);
- real_t max_speed = MIN(camera->get_zfar() / 4, ZOOM_FREELOOK_MAX);
+ real_t min_speed = MAX(camera->get_near() * 4, ZOOM_FREELOOK_MIN);
+ real_t max_speed = MIN(camera->get_far() / 4, ZOOM_FREELOOK_MAX);
real_t scale_length = (max_speed - min_speed);
if (!Math::is_zero_approx(scale_length)) {
@@ -2735,8 +2735,8 @@ void Node3DEditorViewport::_draw() {
} else {
// Show zoom
- real_t min_distance = MAX(camera->get_znear() * 4, ZOOM_FREELOOK_MIN);
- real_t max_distance = MIN(camera->get_zfar() / 4, ZOOM_FREELOOK_MAX);
+ real_t min_distance = MAX(camera->get_near() * 4, ZOOM_FREELOOK_MIN);
+ real_t max_distance = MIN(camera->get_far() / 4, ZOOM_FREELOOK_MAX);
real_t scale_length = (max_distance - min_distance);
if (!Math::is_zero_approx(scale_length)) {