I am creating a game and I wanted to use the JBullet physics engine. I have searched the Javadocs but I have not found anything. How do I define a custom shape to use with JBullet? I was looking for something that I pass the vertices and indices array into, or are there other solutions? Thank you :D
Use ConvexHullShape if your mesh is convex. It takes the vertices as parameter, but doesn't need the indices or other connection information.
For concave mesh you can use BvhTriangleMeshShape. It takes e.g. TriangleIndexVertexArray as a parameter, which is created from lists of triangle indices and vertices.
JBullet is not up-to-date with the latest Bullet versions, but it is still a good physics library for Java.