Fix issue with triangle shape normal computation

This commit is contained in:
Daniel Chappuis 2017-09-12 23:25:21 +02:00
parent 709bed3cec
commit 63833621a0

View File

@ -52,7 +52,7 @@ TriangleShape::TriangleShape(const Vector3& point1, const Vector3& point2, const
mPoints[2] = point3; mPoints[2] = point3;
// Compute the triangle normal // Compute the triangle normal
mNormal = (point3 - point1).cross(point2 - point1); mNormal = (point2 - point1).cross(point3 - point1);
mNormal.normalize(); mNormal.normalize();
mVerticesNormals[0] = verticesNormals[0]; mVerticesNormals[0] = verticesNormals[0];