Advertisement

LPD3DXMESH in Bullet

Started by October 27, 2012 02:04 PM
5 comments, last by Medo Mex 12 years, 3 months ago
I have created a plane in 3Ds max and 2 boxes, I am loading the three .x files into DirectX, so I have LPD3DXMESH, I am trying to load LPD3DXMESH information into Bullet Physics so I can get the two boxes to act like in physical world on the plane, how can I do so?
Bullet physics has many shapes. Boxes, spheres, cylinders, convex meshes, and more. You are going to have to store somewhere what shapes each object has. And load that separately. For simple objects such as boxes and spheres creating the shapes is very simple. For more complicated shapes you can combine multiple simple shapes such as a box with half a sphere protruding out of one end. Or you can use what is called a convex hull. Bullet can build that for you. HullLibrary

You could just use the convex hull for all objects. That would be easier to make, but the convex hull takes more processing time than simpler shapes. For simple scenes you should be fine doing this.
My current game project Platform RPG
Advertisement
In First Person Shooter game, would you recommend that I use convex hull on all the game meshes (Including tanks, airstrikes, helicopters, etc...)?
I would recommend you start here
Physics Simulation Wiki
And specifically start with the user manual
Look at the getting started section.
My current game project Platform RPG
I am already reading in the user manual, but I would like to know if convex hull can be a possible and good to choice to use on all meshes in First Person Shooter game, or I should use primitives instead? box, sphere, etc...

I am already ready in the user manual, but I would like to know if convex hull can be a possible and good to choice to use on all meshes in First Person Shooter game, or I should use primitives instead? box, sphere, etc...


Generally you do not want to use a generic convex hull for the physical representation of all meshes in a game. The computation is expensive so you would generally use the simplest representation you can.

-Josh

--www.physicaluncertainty.com
--linkedin
--irc.freenode.net#gdnet

Advertisement
Thanks,

This topic is closed to new replies.

Advertisement