NickM
19-11-2007 07:08:24
Hi, I used to be able to do this in an earlier version of nxOgre but is it still possible or will it be possible in the future to do it with the newer versions?...
Many thanks
Nick.
shapeGroup* carShape = new shapeGroup();
//Plotting the convex shape verts for the collision model
std::vector<Vector3> verts;
verts.push_back(Vector3(0.9,-0.,2.8)); //+left,+up,+forward
verts.push_back(Vector3(0.9,0.85,2.8));
verts.push_back(Vector3(0.9,0.85,1.2));
verts.push_back(Vector3(0.9,1.4,0.5));
verts.push_back(Vector3(0.9,1.4,-1.2));
verts.push_back(Vector3(0.9,0.85,-1.75));
verts.push_back(Vector3(0.9,0.85,-2.8));
verts.push_back(Vector3(0.9,-0.,-2.8));
verts.push_back(Vector3(-0.9,-0.,2.8));
verts.push_back(Vector3(-0.9,0.85,2.8));
verts.push_back(Vector3(-0.9,0.85,1.2));
verts.push_back(Vector3(-0.9,1.4,0.5));
verts.push_back(Vector3(-0.9,1.4,-1.2));
verts.push_back(Vector3(-0.9,0.85,-1.75));
verts.push_back(Vector3(-0.9,0.85,-2.8));
verts.push_back(Vector3(-0.9,-0.,-2.8));
//Create the Convex shape, using the vertices and car body material as arguments.
carShape->addShape(new convexShape(verts,CarBodyMaterial));
Many thanks
Nick.