This project has moved and is read-only. For the latest updates, please go here.

Texture to Polygon - Polygon Flipped in 3.0

Aug 30, 2010 at 2:17 PM
Edited Aug 30, 2010 at 3: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 12:20 PM

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 12:36 PM
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 12:40 PM

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