How to find if two objects are colliding in bullet physics

Started by
0 comments, last by All8Up 12 years, 4 months ago
When I am referring to bullet physics I mean the physics engine not the projectile.

Using this engine I need to find whether two objects are colliding for example if a character collides with lava they will take damage.

I know this seems extremely trivial but bullet has next to no documentation.

Does anyone know how to do this?
Advertisement
So, you need to go through a couple of steps to get to that point and I would suggest some initial learning first. When you download the sdk there is a pdf in the root directory or read it online at: http://bulletphysics.com/ftp/pub/test/physics/Bullet_User_Manual.pdf. Read up to around chapter 7-8 in order to get a basic overview of how things are tied together. Next, I would suggest just getting your feet wet by going through the following tutorial on how to setup/use things: http://bulletphysics.org/mediawiki-1.5.8/index.php/Hello_World. This is not likely how you want to use the system but it is a good starting point to get ready for real use.

At this point you should start digging through the code for the CollisionInterfaceDemo, this is using only the collision system which leaves all reaction to collision events up to you to deal with. I don't really suggest this as there is a lot of complexity involved in collision response that can be a pain in the butt to do correctly. If you are able to use the full physics world it makes things much easier and you still have the ability to go in and access/modify various items directly. I suggest trying to integrate using the higher level system as it supplies a number of utility items such as a fairly well detailed CharacterController which will do most things without modification and takes care of moving your objects around pretty well.

This topic is closed to new replies.

Advertisement