Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Farseer physics engine.

I have a simple rectangle body and would like it to split into two pieces given a starting coordinate (where the bullet enters the object) and ending coordinate (where it exits).

share|improve this question
up vote 2 down vote accepted

A common technique for creating cutaways or cross-sections is to use an arbitrary clipping plane to exclude a part of the body. By cloning the body and clipping an opposite part of the body you end up with two pieces of something that appears to have been sliced in two.

You would then have to use the stencil buffer to 'fill in' the clip edges, and create new physics bodies for the two new bodies.

share|improve this answer
Thanks. Unfortunately, I don't have access to the stencil buffer. Is there a way of doing it in Silverlight? – Skoder May 3 '11 at 16:28
You could try replacing the original mesh with two new meshes. Using the points of intersection of the cut, and using those points as the new vertices for the new meshes. – Kitt Basch May 4 '11 at 10:06
I guess this will be the best way to do it. Thanks. – Skoder May 4 '11 at 15:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.