I'm looking for a 3D Java physics library which would be effective for objects which are complicated yet locally ordered: by which I mean the object is made up of local axis aligned boxes (see screenshot). This is for a game in which players can create blocky spaceships of arbitrary shapes and the game works out realistic collision shapes (allowing you to walk around inside it etc).
The physics engine I am looking for would have the following
- Efficiently supports objects made of up to 100 subshapes (I already have code that finds the minimum number of boxes with which to represent the object and it usually ends up around 100 cuboids of varying sizes)
- Allows those complex shapes to collide with each other (not just complex vs simple collisions)
- Is a 3D library
- Is in Java
- Anything that uses a gift wrapping approach or similar that does not allow internal voids isn't suitable.
- A Previous physics engine I've tried have used compound shapes where they simply tested each subshape vs each other subshape if a potential collision passed broadphase; 100 subshapes vs 100 subshapes quickly killed that approach (I'm looking at you JBullet).
I know this is possible; in part because I have already written it, however my version is very bare bones and I would like to change for a somewhat more professional physics engine if it were to be available.
I have previously used JBullet (within JMonkey), which is a Java port of Bullet Physics, and while it supported this it was not optimised for it and hated it; grinding to a halt when two such objects were near each other.