summaryrefslogtreecommitdiff
path: root/servers/physics_3d
diff options
context:
space:
mode:
authorTechnoPorg <jonah.janzen@gmail.com>2022-01-27 09:57:15 -0700
committerTechnoPorg <jonah.janzen@gmail.com>2022-01-27 09:57:15 -0700
commit02c002ff28cfe203b44cc45393ade6ce7569d8c8 (patch)
treecfebf36bf7739113684c6e930ff8ba0c002e9153 /servers/physics_3d
parent9df9dc77a396bcdfe362365e9511de80c1e94fc0 (diff)
Fix triangular area calculation
It's a triangle, so the area should be halved. Co-authored-by: Jeffrey Cochran <koenigcochran@gmail.com>
Diffstat (limited to 'servers/physics_3d')
-rw-r--r--servers/physics_3d/godot_soft_body_3d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/physics_3d/godot_soft_body_3d.cpp b/servers/physics_3d/godot_soft_body_3d.cpp
index 1de27760d5..095050b7f3 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.