// Add an epsilon as a tolerance for the raycast,
// in case the ray hits exacly on the edge of the triangle.
// It must be scaled for the triangle size.
if (distance < hitFraction) {
float edge_tolerance = triangleNormal.lengthSquared();
edge_tolerance *= -0.0001f;
Vector3f point = new Vector3f();
VectorUtil.setInterpolate3(point, from, to, distance);
{
Vector3f v0p = Stack.alloc(Vector3f.class);