From 02c002ff28cfe203b44cc45393ade6ce7569d8c8 Mon Sep 17 00:00:00 2001 From: TechnoPorg Date: Thu, 27 Jan 2022 09:57:15 -0700 Subject: [PATCH] Fix triangular area calculation It's a triangle, so the area should be halved. Co-authored-by: Jeffrey Cochran --- servers/physics_3d/godot_soft_body_3d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/physics_3d/godot_soft_body_3d.cpp b/servers/physics_3d/godot_soft_body_3d.cpp index 1de27760d55e..095050b7f3d7 100644 --- a/servers/physics_3d/godot_soft_body_3d.cpp +++ b/servers/physics_3d/godot_soft_body_3d.cpp @@ -245,7 +245,7 @@ void GodotSoftBody3D::update_area() { const Vector3 a = x1 - x0; const Vector3 b = x2 - x0; const Vector3 cr = vec3_cross(a, b); - face.ra = cr.length(); + face.ra = cr.length() * 0.5; } // Node area.