This project has moved. For the latest updates, please go here.

Texture to Polygon - Polygon Flipped in 3.0

Aug 30, 2010 at 1:17 PM
Edited Aug 30, 2010 at 2:05 PM

I'm converting a texture to polygon but when I compare the texture to the polygon, the polygon is flipped vertically to the original texture?

Also for the scale I would have thought this, but the scale goes crazy?

spriteBatch.Draw(texture, Vector2.Transform(compund[0].Body.Position, transform),  new Rectangle(0, 0, texture.Width, texture.Height), Color.White, -compund[0].Body.Rotation, new Vector2(0, texture.Height), 1, SpriteEffects.FlipVertically, 0);


Sep 1, 2010 at 11:20 AM

You need to scale the vertices to world coordinates.

// 100 pixels/meter
Vector2 scale = new Vector2(.01f, .01f);
verts.Scale(ref scale);

So... how do we flip polygons?

Sep 3, 2010 at 11:36 AM
Zms wrote:

So... how do we flip polygons?


This must be relevant in more scenarios, yet I can't figure out how it's done, or find any information on it...

Sep 3, 2010 at 11:40 AM

Isn't something like have to set the cull state to anti-clockwise or clockwise depending on what its currently using.