Help With Bullet Physics Use in a Game

waffler
Posts: 3
Joined: Wed Jul 18, 2007 12:10 am

Help With Bullet Physics Use in a Game

Post by waffler »

I'm not sure if this is the right forum for programming help, but I'll post this here anyhow.

I have started a game project and I currently have Ogre and Bullet working together (tumbling boxes), and I would like to know how I should advance to be able to achieve the following types of interaction:

Non-physics based collision detection:
Some objects, such as power ups, only need to be touched to be used. How would one test if objects are touching and be able to interact with each other?

Non-tumbling physics collisions:
In the real world people and creatures tend to stay upright when standing on sloped ground. How can I make such objects keep from falling over while at the same time being able to bump into walls, climb hills, and jump off cliffs?

Terrain type interactions:
For the world geometry I would need to be able to determine what type of triangle is currently being touched -- grass, dirt, road, water, etc. How might such information be stored and retrieved?

Proximity and field of vision
There are many types of interactions which would need to be invoked without direct physical contact. How might I be able to query for objects within an area?

I would really appreciate having these questions answered, as the solutions to them do not seem entirely obvious to me. Thanks.
binofet
Posts: 20
Joined: Fri Jun 15, 2007 5:03 pm

Post by binofet »

Non-physics based collision detection:

you could use collision filters and a nearCollision callback. I believe the ccdphysicsdemo shows both of those.

Non-tumbling physics collisions:

you can use btRigidBody::setAngularFactor(0.0f) to disable rotation

Terrain type interactions:

i believe this is also demostrated in ccdphysicdemo

Proximity and field of vision:

could you be a little more specific on what you mean here? when you say "field of vision" i assume you are wanting to test if something is in the frustum. you can use plane/sphere tests to check to see if an object is in the field of view. for proximity you could use a sphere and see what objects are inside/intersecting

hope this helps,

binofet