Sfoglia il codice sorgente

Merge pull request #1592 from sxop/master

fix calculation of distance from plane to origin
Sean Taylor 11 anni fa
parent
commit
94043a946f
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      gameplay/src/Form.cpp

+ 1 - 1
gameplay/src/Form.cpp

@@ -1000,7 +1000,7 @@ bool Form::projectPoint(int x, int y, Vector3* point)
 
         // To get the plane's distance from the origin, we project a point on the
         // plane onto the plane's normal vector.
-        const float distance = fabs(Vector3::dot(pointOnPlane, normal));
+        const float distance = Vector3::dot(pointOnPlane, normal);
         Plane plane(normal, -distance);
 
         // Check for collision with plane.