You've already forked godot
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user