Proper way of moving collision shapes

jokooon
Posts: 15
Joined: Wed Apr 20, 2011 12:42 pm

Proper way of moving collision shapes

Post by jokooon »

I'm just using bullet to detect collisions (btSphereShape) with Ogre3D, but I'm not sure how to move it, should I just use a btWorldTransform, since sphere are just translated each frame ?
User avatar
dphil
Posts: 237
Joined: Tue Jun 29, 2010 10:27 pm

Re: Proper way of moving collision shapes

Post by dphil »

Yes. Assuming, of course, that the shape is part of a btCollisionObject:

btCollisionObject::setWorldTransform(btTransform &worldTransform)
gokoon
Posts: 9
Joined: Fri Jan 27, 2012 10:57 am

Re: Proper way of moving collision shapes

Post by gokoon »

What is the purpose of this class in the demo, and its overidden method ?

Code: Select all

struct btDrawingResult : public btCollisionWorld::ContactResultCallback
virtual btScalar addSingleResult(btManifoldPoint& cp, const btCollisionObject* colObj0,int partId0,int index0,const btCollisionObject* colObj1,int partId1,int index1)
I just want to detect collisions between spheres, I don't need the collision point, is this necessary ?
User avatar
dphil
Posts: 237
Joined: Tue Jun 29, 2010 10:27 pm

Re: Proper way of moving collision shapes

Post by dphil »

I'm not sure. I am not familiar with that struct. This sounds like a different question though, in which case it's best to make a new post.