Im having trouble getting my collision meshes to collide properly. Im able to create a GeomTrimesh for my ground using a height map and the collisions work great. But if I load a model, for example a 3ds model with the starfire loader, and then create a collision mesh from that the collisions dont work right (ie moving objects go through it usualy).
In the java3d api if I use a TriangleArray to create the collision mesh like this:
TriangleArray ia = //load with 3ds loader
float[] fa = new float[ia.getVertexCount() * 3];
ia.getCoordinates(0,fa);
int[] index = new int[fa.length / 3];
for(int i = 0; i < index.length; i++)
index[i] = i;
//now create GeomTrimesh with fa and index
Or if I create and IndexedTriangleArray and just use the raw vertecies and index from that it still doesnt work right.
Ive even tried every possible way to reorder the winding of the triangles by swaping indexes. Nothing works. Anyone got any tips for creating GeomTrimeshes from java3d Geometrys?