diff --git a/core/math/face3.cpp b/core/math/face3.cpp index ab09142b2d3..666d214f98f 100644 --- a/core/math/face3.cpp +++ b/core/math/face3.cpp @@ -393,7 +393,7 @@ Vector3 Face3::get_closest_point_to(const Vector3 &p_point) const { s = CLAMP(numer / denom, 0.f, 1.f); t = 1 - s; } else { - s = CLAMP(-e / c, 0.f, 1.f); + s = CLAMP(-d / a, 0.f, 1.f); t = 0.f; } } else {