1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-07 19:53:17 +00:00

Fix triangular area calculation

It's a triangle, so the area should be halved.

Co-authored-by: Jeffrey Cochran <koenigcochran@gmail.com>
This commit is contained in:
TechnoPorg
2022-01-27 09:57:15 -07:00
parent 9df9dc77a3
commit 02c002ff28

View File

@@ -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.