Page 1 of 1

btCompoundShape added extra shape

Posted: Sun Jan 04, 2015 12:26 am
by Magda
Hi,
I have a problem with btCompoundShape, I create shape from 2 cylinders, but when i run my app, it seems to be 3 items in compundshape. Anyone have an idea why? I add picture and code:
img is in attachments,
and here is how i added shape:
http://pastebin.com/CsSSrazu

Re: btCompoundShape added extra shape

Posted: Sun Jan 04, 2015 7:23 pm
by drleviathan
What evidence makes you believe the btCompoundShape has three child shapes instead of just two? Something in the attached image? Or are you calling btCompoundShape::getNumChildShapes() and getting a result of three? Your code shows only two child shapes being added and I can't quite parse what I'm seeing in the image so my first thought is that your conclusions are flawed.

If getNumChildShapes() really is reporting three, then that would be Very Strange ™ and would warrant some serious Sanity Checking ™. I would write debug code to extract the type of each child shape, then run it in a debugger and add breakpoints in the constructor of the offending shape type.