diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-29 15:50:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 15:50:00 +0200 |
commit | 58435b0c917fd93d4244ed672e7fadd076dae608 (patch) | |
tree | b41bc67f056615084a111fdad09e25033e2d21a0 /editor/plugins/node_3d_editor_plugin.cpp | |
parent | 1d45a269f87ff38e04169e6aa85d9ecd73fb3473 (diff) | |
parent | 540156b387270215f513a68b1cf9ffc909ac381b (diff) |
Merge pull request #20371 from aaronfranke/vector-lerp
[Core] [Mono] [GDNative] Rename "linear_interpolate" methods to "lerp"
Diffstat (limited to 'editor/plugins/node_3d_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index e0b0fe6b53..17eaa06d57 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -268,7 +268,7 @@ void Node3DEditorViewport::_update_camera(float p_interp_delta) { real_t factor = (1.0 / inertia) * p_interp_delta; // We interpolate a different point here, because in freelook mode the focus point (cursor.pos) orbits around eye_pos - camera_cursor.eye_pos = old_camera_cursor.eye_pos.linear_interpolate(cursor.eye_pos, CLAMP(factor, 0, 1)); + camera_cursor.eye_pos = old_camera_cursor.eye_pos.lerp(cursor.eye_pos, CLAMP(factor, 0, 1)); float orbit_inertia = EDITOR_GET("editors/3d/navigation_feel/orbit_inertia"); orbit_inertia = MAX(0.0001, orbit_inertia); @@ -318,7 +318,7 @@ void Node3DEditorViewport::_update_camera(float p_interp_delta) { camera_cursor.y_rot = cursor.y_rot; } - camera_cursor.pos = old_camera_cursor.pos.linear_interpolate(cursor.pos, MIN(1.f, p_interp_delta * (1 / translation_inertia))); + camera_cursor.pos = old_camera_cursor.pos.lerp(cursor.pos, MIN(1.f, p_interp_delta * (1 / translation_inertia))); camera_cursor.distance = Math::lerp(old_camera_cursor.distance, cursor.distance, MIN(1.f, p_interp_delta * (1 / zoom_inertia))); } } @@ -4570,10 +4570,10 @@ void Node3DEditor::_generate_selection_box() { st->add_color(Color(1.0, 1.0, 0.8, 0.8)); st->add_vertex(a); st->add_color(Color(1.0, 1.0, 0.8, 0.4)); - st->add_vertex(a.linear_interpolate(b, 0.2)); + st->add_vertex(a.lerp(b, 0.2)); st->add_color(Color(1.0, 1.0, 0.8, 0.4)); - st->add_vertex(a.linear_interpolate(b, 0.8)); + st->add_vertex(a.lerp(b, 0.8)); st->add_color(Color(1.0, 1.0, 0.8, 0.8)); st->add_vertex(b); } |