Ball/Box against static trimesh, and selective collision

Spaddlewit
Posts: 28
Joined: Fri Sep 04, 2009 8:23 pm

Ball/Box against static trimesh, and selective collision

Post by Spaddlewit »

I just started using bullet, and I think I have the basics down of creating a triangle mesh, spheres, and boxes. I've found the SDK demos pretty dismal with the comments, so it's been difficult figuring out a few simple things:

1) How do I get/set the XYZ position of a collisionShape?
2) How do I get/set the XYZ momentum of a collisionShape (what is bullet's terminology for this... momentum? inertia? velocity?)
3) How can I define a sphere/box to do collision response against some spheres/boxes but not others? (For example, a health orb that can bounce around objects other than the player, but rather than bounce off the player, I can detect this collision and have the player collect the orb instead).
4) How do I set the UP vector of an object, as well as its "angle it's facing" vector? Do I just compose a btTransform when the object is created? What if I want to change the UP and ANGLE vectors after the object has been created?

Sorry if some of these questions seem pretty stupid, but I think an additional demo that elegantly articulates these common (at least I think this is what most people are looking for) concepts would be awesome!
Spaddlewit
Posts: 28
Joined: Fri Sep 04, 2009 8:23 pm

Re: Ball/Box against static trimesh, and selective collision

Post by Spaddlewit »

I feel pretty stupid after finding this:
http://www.bulletphysics.com/mediawiki- ... e_Snippets

Why is the wiki not linked on the main page? I actually stumbled across this via Google, and then later via another forum thread.