summaryrefslogtreecommitdiffstats
path: root/core/math
diff options
context:
space:
mode:
authorkleonc <9283098+kleonc@users.noreply.github.com>2023-05-19 13:28:50 +0200
committerkleonc <9283098+kleonc@users.noreply.github.com>2023-06-14 14:54:00 +0200
commit77b8e0fcb7cfcdabed7e7217caedf69c049c7a3e (patch)
tree431c7cad0738d660793e0f4a703c7fe56dd24621 /core/math
parent01453ab7f3e6940ecd611d63d675a484b2f55cb4 (diff)
downloadredot-engine-77b8e0fcb7cfcdabed7e7217caedf69c049c7a3e.tar.gz
Allow setting negative WorldBoundaryShape2D.distance through the editor
Diffstat (limited to 'core/math')
-rw-r--r--core/math/plane.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/core/math/plane.cpp b/core/math/plane.cpp
index 99694d7871..6b9bcea081 100644
--- a/core/math/plane.cpp
+++ b/core/math/plane.cpp
@@ -98,13 +98,11 @@ bool Plane::intersects_ray(const Vector3 &p_from, const Vector3 &p_dir, Vector3
Vector3 segment = p_dir;
real_t den = normal.dot(segment);
- //printf("den is %i\n",den);
if (Math::is_zero_approx(den)) {
return false;
}
real_t dist = (normal.dot(p_from) - d) / den;
- //printf("dist is %i\n",dist);
if (dist > (real_t)CMP_EPSILON) { //this is a ray, before the emitting pos (p_from) doesn't exist
@@ -121,13 +119,11 @@ bool Plane::intersects_segment(const Vector3 &p_begin, const Vector3 &p_end, Vec
Vector3 segment = p_begin - p_end;
real_t den = normal.dot(segment);
- //printf("den is %i\n",den);
if (Math::is_zero_approx(den)) {
return false;
}
real_t dist = (normal.dot(p_begin) - d) / den;
- //printf("dist is %i\n",dist);
if (dist < (real_t)-CMP_EPSILON || dist > (1.0f + (real_t)CMP_EPSILON)) {
return false;