You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-28 16:07:14 +00:00
Increased max view distance in spatial editor plugin
Increased from 10000 to 1000000. I also removed two related magic numbers. Closes #30766.
This commit is contained in:
@@ -69,7 +69,7 @@
|
|||||||
#define FREELOOK_SPEED_MULTIPLIER 1.08
|
#define FREELOOK_SPEED_MULTIPLIER 1.08
|
||||||
|
|
||||||
#define MIN_Z 0.01
|
#define MIN_Z 0.01
|
||||||
#define MAX_Z 10000
|
#define MAX_Z 1000000.0
|
||||||
|
|
||||||
#define MIN_FOV 0.01
|
#define MIN_FOV 0.01
|
||||||
#define MAX_FOV 179
|
#define MAX_FOV 179
|
||||||
@@ -645,7 +645,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hig
|
|||||||
|
|
||||||
Vector3 r;
|
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);
|
float d = r.distance_to(ray_pos);
|
||||||
if (d < col_d) {
|
if (d < col_d) {
|
||||||
col_d = d;
|
col_d = d;
|
||||||
@@ -753,7 +753,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hig
|
|||||||
|
|
||||||
Vector3 r;
|
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);
|
float d = r.distance_to(ray_pos);
|
||||||
if (d < col_d) {
|
if (d < col_d) {
|
||||||
col_d = d;
|
col_d = d;
|
||||||
|
|||||||
Reference in New Issue
Block a user