Closed CientistaVuador closed 6 months ago
Thanks for raising this issue. I'll investigate.
thanks
I propose to add 2 public methods to MeshCollisionShape
:
/**
* Count how many submeshes are in the mesh.
*
* @return the count (≥0)
*/
public int countSubmeshes() {
//...
}
/**
* Access the specified submesh.
*
* @param index the index of the desired submesh (in the order the submeshes
* were added, ≥0)
* @return the pre-existing instance (not null)
*/
public IndexedMesh getSubmesh(int index) {
//...
}
That should provide sufficient access to avoid any need for reflection in this use case.
And since GImpactCollisionShape
potentially has the same issue, I'll add similar methods there.
Sound good?
yes
I'll release a new version ASAP.
thanks
@CientistaVuador: Please test whether version 20.2.0 solves this issue for you.
I tested it, works fine
I need to get the normal of a triangle in a MeshCollisionShape using the partIndex() and triangleIndex() from the sweep test result but I don't see any way to do it without using reflection and getting the CompoundMesh directly, the normal from the sweep test result is not accurate as you can see here: https://pybullet.org/Bullet/phpBB3/viewtopic.php?t=3538