I have already looked at the Documentation on there Website, but the code provieded to create a shape out of an Texture is outdated for the newest version. The body is very simple so maybe i can do it with just 2 rectange but i have no idea how to do, because I just started with Farseer. Here my texture: Texture
|
First, you need to get the color data as uint's in an array, so:
After, you can use Farseer's
Finally, you want to decompose those Vertices into something usable so they can be used to create polygons, using one of the many Farseer Decomposers
There are many different methods under You might need to scale your vertices appropriately (since the result is in pixels and Farseer uses "meters") so you can do something like this
|
|||||||||||
|