Desperate: Dont understand how to use btCollisionObjectWrapper

Post Reply
qwert75
Posts: 1
Joined: Mon May 14, 2018 6:05 am

Desperate: Dont understand how to use btCollisionObjectWrapper

Post by qwert75 » Mon May 14, 2018 6:13 am

First off, ive not been trying to use bullet for long. I came to bullet as it offers collision detection(obvs.). i saw an old demo on how to use bullet as purely detecting collision between two triangular mesh's, awesome.

the demo i worked my way through uses btCollisionObject, but everything seems to now use btCollisionObjectWrapper. This has 0 explanation on how to use, create or anything. every time i come across someone in a similar position there is no answers.

Ive tried making a btCollisionObjectWrapper but it requires a parent, in the form of a btCollisionWrapper.

Can someone please just explain to me how to bloody go from a btCollisionObject to a btCollisionObjectWrapper.

User avatar
drleviathan
Posts: 451
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Desperate: Dont understand how to use btCollisionObjectWrapper

Post by drleviathan » Mon May 14, 2018 4:02 pm

From what I can tell by looking at the code: btCollisionObjectWrapper is just a struct used as an argument to be passed around for the "CollisionAlgorithm" API. That is, rather than pass six arguments separately, they are bundled into one struct which is then passed around by reference.

Most game application code that uses Bullet never needs to deal with btCollisionObjectWrapper. It is used by deeper Bullet API than most games bother to dig. But it sounds like you're trying to do something less typical.

Perhaps you could explain what you really want to do. You have two triangle meshes and you want to do "collision detection" on them, extract the collision details, but not bother with the dynamics?

I suppose you already figured out that you can't use btBvhTriangleMeshShapes since Bullet has not implemented a CollisionAlgorithm between to of those shapes. Instead you need to use btGImpactShape. Beyond this I can't help much, but there are a few others on this forum who have tried to use Bullet to only compute collision details between two objects.

Post Reply