diff options
author | Marcus Brummer <mbrlabs7@gmail.com> | 2019-07-23 11:42:41 +0200 |
---|---|---|
committer | Marcus Brummer <mbrlabs7@gmail.com> | 2019-07-23 11:42:41 +0200 |
commit | 4c8fa414bba9e56f344d6b4e645b94ec9913b898 (patch) | |
tree | 8e029d204c655c928131e8bd7145b89b407a188a /editor/plugins | |
parent | c7a427241e7f4dd6ab9ac89f51d3bb9f6632008b (diff) |
Increased max view distance in spatial editor plugin
Increased from 10000 to 1000000. I also removed two related magic numbers.
Closes #30766.
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index b475eee920..6e4af5cd25 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -69,7 +69,7 @@ #define FREELOOK_SPEED_MULTIPLIER 1.08 #define MIN_Z 0.01 -#define MAX_Z 10000 +#define MAX_Z 1000000.0 #define MIN_FOV 0.01 #define MAX_FOV 179 @@ -645,7 +645,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hig Vector3 r; - if (Geometry::segment_intersects_sphere(ray_pos, ray_pos + ray * 10000.0, grabber_pos, grabber_radius, &r)) { + if (Geometry::segment_intersects_sphere(ray_pos, ray_pos + ray * MAX_Z, grabber_pos, grabber_radius, &r)) { float d = r.distance_to(ray_pos); if (d < col_d) { col_d = d; @@ -753,7 +753,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hig Vector3 r; - if (Geometry::segment_intersects_sphere(ray_pos, ray_pos + ray * 10000.0, grabber_pos, grabber_radius, &r)) { + if (Geometry::segment_intersects_sphere(ray_pos, ray_pos + ray * MAX_Z, grabber_pos, grabber_radius, &r)) { float d = r.distance_to(ray_pos); if (d < col_d) { col_d = d; |