Browse Source

Do not use PIXEL_SIZE from Urho2D in Physics2D. Fix https://github.com/urho3d/Urho3D/issues/2912

1vanK 3 years ago
parent
commit
31968ddf28
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/Urho3D/Physics2D/PhysicsWorld2D.cpp

+ 2 - 2
Source/Urho3D/Physics2D/PhysicsWorld2D.cpp

@@ -230,10 +230,10 @@ void PhysicsWorld2D::DrawCircle(const b2Vec2& center, float radius, const b2Colo
     }
     }
 }
 }
 
 
-extern URHO3D_API const float PIXEL_SIZE;
-
 void PhysicsWorld2D::DrawPoint(const b2Vec2& p, float size, const b2Color& color)
 void PhysicsWorld2D::DrawPoint(const b2Vec2& p, float size, const b2Color& color)
 {
 {
+    const float PIXEL_SIZE = 0.01f; // Urho2D can be disabled, so duplicate constant here
+
     DrawSolidCircle(p, size * 0.5f * PIXEL_SIZE, b2Vec2(), color);
     DrawSolidCircle(p, size * 0.5f * PIXEL_SIZE, b2Vec2(), color);
 }
 }