btCompoundShape added extra shape

Post Reply
Magda
Posts: 1
Joined: Sun Jan 04, 2015 12:13 am

btCompoundShape added extra shape

Post 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
Attachments
Untitled.png
Untitled.png (3.55 KiB) Viewed 3063 times
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: btCompoundShape added extra shape

Post 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.
Post Reply