Detect two specific objects collision with bullet physics
Posted
by
sebap123
on Game Development
See other posts from Game Development
or by sebap123
Published on 2012-01-12T14:06:03Z
Indexed on
2012/03/30
11:42 UTC
Read the original article
Hit count: 424
opengl
|bullet-physics
I have got some problem with defining collision between objects in my game using bullet physics.
I know that objects are colliding with each other simultaneously and I don't have to do anything more. However I need to be noticed when one object collides with one of the rest.
It is quite awkward written so I will tell what I want to achive. I have got ball which hits wall from tubes. Everything is on the floor. When ball hits wall some fragments fall down to infinity. So I have got bellow floor btStaticPlaneShape. This is place where most of objects is stoping and then I can start another action. But not all of them.
So I've been trying to use function checkCollideWith
but it isn't good method as it was said in reference and wiki.
So I've checked method described in wiki http://bulletphysics.org/mediawiki-1.5.8/index.php/Collision_Callbacks_and_Triggers called contact information. This isn't good method either because it is extremly hard to identify what is what when colliding. You have to also remember that ball is almost all the time colliding with something - floor, wall or eart level.
So is there any other method to check what is colliding with what?
© Game Development or respective owner