Does anyone now how to use btCompoundShape???!!! ( HELP )

johnsonalpha
Posts: 73
Joined: Fri May 01, 2015 8:23 pm

Does anyone now how to use btCompoundShape???!!! ( HELP )

Post by johnsonalpha »

this is my code i don't now why this returns a error

Code: Select all

btCollisionShape* boxshape = new btBoxShape(btVector3(box_width, box_height, box_length));

btCollisionShape* boxshape2 = new btBoxShape(btVector3(box_width, box_height, box_length));

compound->addChildShape(startTransform,boxshape);

compound->addChildShape(startTransform,boxshape2);

compound->calculateLocalInertia(compmass, compfallInertia);
btRigidBody::btRigidBodyConstructionInfo fallRigidBodyCI(compmass, compfallMotionState, compound, compfallInertia);
btRigidBody* fallRigidBody = new btRigidBody(fallRigidBodyCI);

dynamicsWorld->addRigidBody(fallRigidBody);
johnsonalpha
Posts: 73
Joined: Fri May 01, 2015 8:23 pm

Re: Does anyone now how to use btCompoundShape???!!! ( HELP

Post by johnsonalpha »

Need help please!!
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Does anyone now how to use btCompoundShape???!!! ( HELP

Post by drleviathan »

So... what's the error?

Is it a compile error? a link error? or a runtime error?
Basroil
Posts: 463
Joined: Fri Nov 30, 2012 4:50 am

Re: Does anyone now how to use btCompoundShape???!!! ( HELP

Post by Basroil »

I suggest you get a debugger and attempt to fix the place it crashes at by correcting the error that comes up.

Nobody can help you until you know where the error is and what is causing it.

(my guess that you didn't declare something and are getting a compiler error, in which case the compiler will tell you exactly where the mistake was first noticed)
johnsonalpha
Posts: 73
Joined: Fri May 01, 2015 8:23 pm

Re: Does anyone now how to use btCompoundShape???!!! ( HELP

Post by johnsonalpha »

drleviathan wrote:So... what's the error?

Is it a compile error? a link error? or a runtime error?
I was wondering if im using the btCompound right?