Remove entity from a CompoundBody

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
User avatar
alakryon
Posts: 6
Joined: Fri Nov 21, 2008 8:41 am
Location: Miskolc, Hungary

Remove entity from a CompoundBody

Post by alakryon »

Hi!

I have a CompoundBody made from 3 entities. When I try to remove one of them with the CompoundBody.removeBody() method, I got an ArgumentOutOfRange exception. :? Maybe there is something else to do prior to the use of removeBody() ?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Remove entity from a CompoundBody

Post by Norbo »

Not sure why that would happen. Could you provide the compound's initialization code and removal so I can replicate the issue?

In the mean time, a workaround is to remove the compound body from the space, make a new compound body composed of only the remaining subbodies, and add this new compound body to the space as a replacement of sorts.
Post Reply