e.g: you have a city, and you loaded this city into your game engine, what do you use for collision detection in bullet?
this is what I did in Irrlicht game engine, but not sure if it works:
Code: Select all
btConvexHullShape* chs = new btConvexHullShape();
int count = meshTahta->getMeshBufferCount();
scene::IMeshBuffer* mb = meshTahta->getMeshBuffer(0);
int vcount = mb->getVertexCount();
float* vertices = (float*)mb->getVertices();
for (int i = 0; i < vcount; i+= 3)
{
chs->addPoint(btVector3(vertices[0], vertices[1], vertices[2]));
}