Probably fixed all the jittering, won't need the jitter guard anymore.

This commit is contained in:
William Moberg
2016-03-09 19:45:26 +01:00
parent 8a3564ad49
commit 8936b3d6c3
5 changed files with 7 additions and 18 deletions
+1
View File
@@ -470,6 +470,7 @@ bool AABBvsTriangle(const AABB& box,
}
glm::vec3 cornerResolution = (1+t) * diagonal;
cornerResolution = glm::dot(cornerResolution, triNormal) * triNormal;
//Overwrite the smallest resolution if cornerResolution is smaller.
float lenSq = glm::length2(cornerResolution);
if (lenSq < resolveShortest.DistanceSq) {