Skip to content

Usage of ConvexMeshShape with collider #264

Answered by DanielChappuis
Bubbasm asked this question in Q&A
Discussion options

You must be logged in to vote

I took the time to try again with the code from the documentation. I replaced the code that creates a ConvexMeshShape in the testbed application here by the code from the documentation that creates a simple cube and it's working fine. If I display the collision shapes in the tesbed application, I can see that the collision shape is now a cube.

Can you check in your code that your your array of vertices, indices, PolygonFace, your PolygonVertexArray and PolyhedronMesh are persisted in memory and not destroyed right after the ConvexMeshShape creation. As written in the documentation (see quote below), those objects needs to persist in memory during the whole simulation not just during colli…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Bubbasm
Comment options

Comment options

You must be logged in to vote
1 reply
@Bubbasm
Comment options

Answer selected by Bubbasm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants