Explorar el Código

Merge pull request #1593 from sxop/next

fix calculation of distance from plane to origin
Sean Taylor hace 11 años
padre
commit
22d575f2c2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      gameplay/src/Form.cpp

+ 1 - 1
gameplay/src/Form.cpp

@@ -1025,7 +1025,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.