Browse Source

Go through all vertices of the StaticSprite2D to update its bounding box. Closes #972.

Lasse Öörni 10 years ago
parent
commit
24ac93600e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/Urho3D/Urho2D/StaticSprite2D.cpp

+ 1 - 1
Source/Urho3D/Urho2D/StaticSprite2D.cpp

@@ -212,7 +212,7 @@ void StaticSprite2D::OnWorldBoundingBoxUpdate()
     worldBoundingBox_.Clear();
 
     const Vector<SourceBatch2D>& sourceBatches = GetSourceBatches();
-    for (unsigned i = 0; i < sourceBatches[0].vertices_.Size(); i += 2)
+    for (unsigned i = 0; i < sourceBatches[0].vertices_.Size(); ++i)
         worldBoundingBox_.Merge(sourceBatches[0].vertices_[i].position_);
 
     boundingBox_ = worldBoundingBox_.Transformed(node_->GetWorldTransform().Inverse());