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

Creating Shapes From Textures

Topics: User Forum
Dec 18, 2011 at 7:04 PM

I want to create collision vertices to attach to bodies in XNA with Farseer, according to loaded Texture2Ds.

A caveat, first of all. is that I'm not using Farseer for anything other than collision. Rendering and all other game code is done using my own engine. Farseer is just used as a background physics simulator (and will only tell me when a collision happens, and then I'll handle that myself).

I should point out here that I'm 100% new to Farseer. Never used it before.

So, if I create my List using BayazitDecomposer.ConvexPartition(verts), should I then store this data alongside the Texture2D objects; and then create List objects on the fly when I create my collidable actors? Or am I doing something wrong?

Furthermore, in the example at, it scales the vertices by Vertices.Scale()... If I keep all my Farseer bodies in pixel space, do I need to do this?

Thank you.