Browse Source

make collision polygons a tiny bit wider to protect against gaps (from ynjh_jo)

David Rose 17 years ago
parent
commit
788609a4e0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/collide/collisionPolygon.I

+ 1 - 1
panda/src/collide/collisionPolygon.I

@@ -143,7 +143,7 @@ flush_level() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE bool CollisionPolygon::
 INLINE bool CollisionPolygon::
 is_right(const LVector2f &v1, const LVector2f &v2) {
 is_right(const LVector2f &v1, const LVector2f &v2) {
-  return (v1[0] * v2[1] - v1[1] * v2[0]) > 0;
+  return (v1[0] * v2[1] - v1[1] * v2[0]) > 1.0e-6f;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////