Hi,
I have now replaced the other shape in my code to hkpExtendedMeshShape. I'm creating just one test triangle to it for now. But something's wrong, it now crashes to physicsWorld->addEntity(g_floor);
hkpExtendedMeshShape* shape2 = new hkpExtendedMeshShape();
hkpExtendedMeshShape::TrianglesSubpart part;
float verts[9];
verts[0]=0; verts[1]=1; verts[2]=2;
verts[3]=3; verts[4]=4; verts[5]=5;
verts[6]=6; verts[7]=7; verts[8]=8;
part.m_vertexBase = verts;
part.m_vertexStriding = sizeof(float)*3;
part.m_numVertices = 3;
unsigned short faces[3];
faces[0]=0; faces[1]=3; faces[2]=6;
part.m_indexBase = faces;
part.m_indexStriding = sizeof( unsigned short)*3;
part.m_numTriangleShapes = 1;
part.m_stridingType = hkpExtendedMeshShape::INDICES_INT16;
shape2->addTrianglesSubpart( part );
boxInfo.m_shape = shape2;
boxInfo.m_motionType = hkpMotion::MOTION_FIXED;
boxInfo.m_position.set(0.0f, 0.0f, 0.0f);
boxInfo.m_restitution = 0.9f;
g_floor = new hkpRigidBody(boxInfo);
shape2->removeReference();
physicsWorld->addEntity(g_floor);
Would you have any ideas what could be wrong?
Best Regards,
vfgdfg