Farseer: Cutting body from texture

Posted by Robin Betka on Game Development See other posts from Game Development or by Robin Betka
Published on 2013-06-30T18:26:56Z Indexed on 2013/06/30 22:28 UTC
Read the original article Hit count: 266

Filed under:
|
|
|

Is it possible to cut a body from a texture in Farseer 3.0?

I have a texture converted to a body with multiple fixtures ( using BayazitDecomposer, CreatePolygon method, ..) and can even do it as a BreakableBody.

But when I try to cut it with the cutting tool, the fixture itself gets cutted but it's connections get discarded! So when I have 14 fixtures, and cut fixture 3 for example, fixture 3 gets cutted but 1,2 and 3-14 just go away. Is there a way to do it? It would work already if I could convert the texture into a body with 1 fixture only, but I haven't figured out it that's possible. BayazitDecomposer creates the multiple verticles, but letting it away creates something weird and I get assert messages all the time.

I know I couldn't break it that way but I don't need that anyway when I could cut it. The breaking is just the work around I'm using now.

Extending the cuttingtool to support multiple fixtures is very hard especially when you consider that in one cut multiple fixtures could be cutted and then connected again.

© Game Development or respective owner

Related posts about XNA

Related posts about c#