Hello.
I'm trying to load a terrain mesh as a triangle mesh, so that a character can walk over the terrain.
I'm getting an error which states: "Only 16 bit indices are supported", while extracting the triangle mesh from the object.
Any hints?
This is my code:
TriangleMesh tmesh = TriangleMesh.FromModel(_terrainCollisionModel); //Error in this line.
TriangleMeshShape tmeshShape = new TriangleMeshShape(tmesh);
tmeshShape.Partition = new AabbTree<int>();
// Contact welding creates smoother contact normals - but it costs a bit of performance.
tmeshShape.EnableContactWelding = true;
AddBody("TMesh", new Pose(new Vector3F(0, 0, 0)), tmeshShape, MotionType.Static);
Edit: Problem solved mesh was too big.