Browse Source

- Changed the poly list values used when creating a Quad in ShapeVector::setPolyPrimitive. The previous values were resulting in a render that was twice the size of the actual AABB. This should resolve https://github.com/GarageGames/Torque2D/issues/43

MichPerry-GG 12 years ago
parent
commit
ce0e10f
1 changed files with 4 additions and 4 deletions
  1. 4 4
      engine/source/2d/sceneobject/ShapeVector.cc

+ 4 - 4
engine/source/2d/sceneobject/ShapeVector.cc

@@ -374,10 +374,10 @@ void ShapeVector::setPolyPrimitive( const U32 polyVertexCount )
     else if ( polyVertexCount == 4 )
     {
         // Yes, so set Quad.
-        mPolygonBasisList[0].Set(-1.0f, -1.0f);
-        mPolygonBasisList[1].Set(+1.0f, -1.0f);
-        mPolygonBasisList[2].Set(+1.0f, +1.0f);
-        mPolygonBasisList[3].Set(-1.0f, +1.0f);
+        mPolygonBasisList[0].Set(-0.5f, -0.5f);
+        mPolygonBasisList[1].Set(+0.5f, -0.5f);
+        mPolygonBasisList[2].Set(+0.5f, +0.5f);
+        mPolygonBasisList[3].Set(-0.5f, +0.5f);
     }
     else
     {