Jump to content

  • Log In with Google      Sign In   
  • Create Account

How to find if two objects are colliding in bullet physics


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 ic0de   Members   -  Reputation: 849

Like
0Likes
Like

Posted 10 December 2011 - 01:22 PM

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?

you know you program too much when you start ending sentences with semicolons;


Sponsor:

#2 AllEightUp   Moderators   -  Reputation: 4217

Like
1Likes
Like

Posted 10 December 2011 - 03:59 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS