How to find if two objects are colliding in bullet physics
Members - Reputation: 938
Posted 10 December 2011 - 01:22 PM
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?
you know you program too much when you start ending sentences with semicolons;
Moderators - Reputation: 4538
Posted 10 December 2011 - 03:59 PM
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.