Split Texture2D Across Line

Posted by Simie on Game Development See other posts from Game Development or by Simie
Published on 2012-06-29T18:12:12Z Indexed on 2012/06/29 21:24 UTC
Read the original article Hit count: 183

Filed under:
|
|

Background

I'm using a texture as a damage map represented by an array of floats for displaying damage effects on a space ship in a process.

http://i.stack.imgur.com/8MnwF.png

An upside of this is being able to 'slice' ships in half, using an input damage map with a line down the middle, as shown in the diagram below.

ShipInHalf

Question

However, I'm encountering problems separating this split ship into two different entities. I would like to be able to split the image down the 'damage line', in a process similar to this:

http://i.stack.imgur.com/IsTFr.png

I don't have much idea where to start detecting the red line above. Any advice would be welcome.

© Game Development or respective owner

Related posts about XNA

Related posts about c#