Collision response based on the dynamic type of 2 objects

Bonbon
Posts: 4
Joined: Fri Feb 25, 2011 5:40 pm

Collision response based on the dynamic type of 2 objects

Post by Bonbon »

Hi there,

I was wondering if anyone you of a way of finding and having a specific collision response based on the dynamic type of 2 different objects. Each objects are of the same base class which holds all the Bullet info

Code: Select all

	//defines the rigidbody physics of the object
	btRigidBody* m_rigidBody;

	//The Collision shape of the object
	btCollisionShape* m_shape;

	//Used to synchronize world transforms with offsets
	btDefaultMotionState * m_motionState;

	//For orientation
	btQuaternion m_qtn;

	//For rigidbody transforms
	btTransform m_trans;
I don't need to alter how bullet handles the physics between the two objects, I would like to add some additional behavior that calls a specific function based on the two types of objects.

What I really need I guess is a way of finding all the colliding pairs of my GameObjects. Anyone know how?
User avatar
dphil
Posts: 237
Joined: Tue Jun 29, 2010 10:27 pm

Re: Collision response based on the dynamic type of 2 object

Post by dphil »

It sounds like perhaps you want custom collision filtering?

http://bulletphysics.org/mediawiki-1.5. ... _Filtering