I found that it was missing a few method implementations. Several methods in MobileMeshShape throw a NotImplementedException. I'm using 1.6.0.
Woops! I'll get that fixed in the development version (
http://bepuphysics.codeplex.com/SourceC ... evelopment) in a few minutes.
The backing logic for those methods is present, but apparently all my test cases went through a different path.
However, I'm wondering if there is a better way to do this anyway.
For one thing, using a few convex hulls for the immutable portions of the hull will be far cheaper than mobile meshes. The final vertex count should still be kept under control for the convex hulls; their collision detection cost increases almost linearly with the vertex count.
would it be possible to have one body (the body of the tank) as a dynamic body, and then attach the turret and other moving parts as kinematic objects?
Yup. You'll probably want to adjust the collision rules so it doesn't undergo collision response with anything, since as a kinematic object, it has infinite inertia. Information about collision rules can be found here:
http://bepuphysics.codeplex.com/wikipag ... umentation
Setting the kinematic objects' entity.CollisionInformation.CollisionRules.Personal = CollisionRule.NoSolver would probably do the trick. "NoSolver" means it will do everything in the collision detection pipeline, including generating contacts, but the solver won't try to perform collision response.
To make the kinematic entity follow the dynamic body, assuming there is no collision response whatsoever with the kinematic body, setting the position/orientation each frame will work.
There's also the more physical option of connecting a tank's dynamic turret to the main dynamic body using a constraint.