Page 1 of 1

Remove entity from a CompoundBody

Posted: Mon Dec 01, 2008 12:30 pm
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() ?

Re: Remove entity from a CompoundBody

Posted: Mon Dec 01, 2008 8:54 pm
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.