here this is the code fomre conevex cast, it simpel set teh id to zero.
- Code: Select all
for (dgInt32 i = 0; i < count; i++) {
info[totalCount].m_hitBody = body;
info[totalCount].m_point[0] = points[i].m_x;
info[totalCount].m_point[1] = points[i].m_y;
info[totalCount].m_point[2] = points[i].m_z;
info[totalCount].m_normal[0] = normals[i].m_x;
info[totalCount].m_normal[1] = normals[i].m_y;
info[totalCount].m_normal[2] = normals[i].m_z;
info[totalCount].m_penetration = penetration[i];
info[totalCount].m_contaID = 0;
totalCount++;
}
this is eassy to fix. teh othe thing is not so eassy.
Tell me if I make so that is repost teh proper material ID, an dteh proper sub collsion shape, does that help.
The positing the face index is no so eassy as newton does not have a super class to represent shape format or mesh format.
the face repost in a clall back is simpel because they are in report in a local search, as soon as the function exit the data is lost.
I can see thsi si eeasy for collision tree, but oteh stuff liek higfiedll conve hull, do no have face index.
on the other hand if you have the index id that was saved to the face, plus the collision shape, then you can get bothe the material and the face by making a lookup table
I can make the demo to report that information if you want.
but first I will fix teh Bug