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:
parent
9df9dc77a3
commit
02c002ff28
1 changed files with 1 additions and 1 deletions
|
@ -245,7 +245,7 @@ void GodotSoftBody3D::update_area() {
|
||||||
const Vector3 a = x1 - x0;
|
const Vector3 a = x1 - x0;
|
||||||
const Vector3 b = x2 - x0;
|
const Vector3 b = x2 - x0;
|
||||||
const Vector3 cr = vec3_cross(a, b);
|
const Vector3 cr = vec3_cross(a, b);
|
||||||
face.ra = cr.length();
|
face.ra = cr.length() * 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Node area.
|
// Node area.
|
||||||
|
|
Loading…
Reference in a new issue