|
|
@@ -128,10 +128,13 @@ void StaticSprite2D::UpdateVertices()
|
|
|
float rightX = width * (1.0f - hotSpotX);
|
|
|
float bottomY = -height * hotSpotY;
|
|
|
float topY = height * (1.0f - hotSpotY);
|
|
|
- vertex0.position_ = Vector3(leftX, bottomY, 0.0f);
|
|
|
- vertex1.position_ = Vector3(leftX, topY, 0.0f);
|
|
|
- vertex2.position_ = Vector3(rightX, topY, 0.0f);
|
|
|
- vertex3.position_ = Vector3(rightX, bottomY, 0.0f);
|
|
|
+
|
|
|
+ const Matrix3x4& worldTransform = node_->GetWorldTransform();
|
|
|
+
|
|
|
+ vertex0.position_ = worldTransform * Vector3(leftX, bottomY, 0.0f);
|
|
|
+ vertex1.position_ = worldTransform * Vector3(leftX, topY, 0.0f);
|
|
|
+ vertex2.position_ = worldTransform * Vector3(rightX, topY, 0.0f);
|
|
|
+ vertex3.position_ = worldTransform * Vector3(rightX, bottomY, 0.0f);
|
|
|
|
|
|
float invTexW = 1.0f / (float)texture->GetWidth();
|
|
|
float invTexH = 1.0f / (float)texture->GetHeight();
|