1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Use functions defined in the their classes.

This commit is contained in:
Anilforextra
2021-09-29 09:36:34 +05:45
parent 5aa099aaed
commit fc9767abb1
16 changed files with 41 additions and 58 deletions

View File

@@ -6280,7 +6280,7 @@ void Node3DEditor::update_grid() {
// Gets a orthogonal or perspective position correctly (for the grid comparison)
const Vector3 camera_position = get_editor_viewport(0)->camera->get_position();
if (!grid_init_draw || (camera_position - grid_camera_last_update_position).length() >= 10.0f) {
if (!grid_init_draw || grid_camera_last_update_position.distance_squared_to(camera_position) >= 100.0f) {
_finish_grid();
_init_grid();
grid_init_draw = true;