Proper way of moving collision shapes
-
- Posts: 15
- Joined: Wed Apr 20, 2011 12:42 pm
Proper way of moving collision shapes
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 ?
-
- Posts: 237
- Joined: Tue Jun 29, 2010 10:27 pm
Re: Proper way of moving collision shapes
Yes. Assuming, of course, that the shape is part of a btCollisionObject:
btCollisionObject::setWorldTransform(btTransform &worldTransform)
btCollisionObject::setWorldTransform(btTransform &worldTransform)
-
- Posts: 9
- Joined: Fri Jan 27, 2012 10:57 am
Re: Proper way of moving collision shapes
What is the purpose of this class in the demo, and its overidden method ?
I just want to detect collisions between spheres, I don't need the collision point, is this necessary ?
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)
-
- Posts: 237
- Joined: Tue Jun 29, 2010 10:27 pm
Re: Proper way of moving collision shapes
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.