Collision problems

Hey people!

We’re coding a game similar to marble madness, in which there is a sphere with a SphereCollisionShape and a bunch of static meshes (there are some moving meshes too). The problem is, sometimes the sphere goes through meshes without colliding, Each mesh has it’s own simplified collision mesh done by hand, so the mesh complexity is usually very low and should not be the problem.

We’re using a RigidBodyControl wrapper that does not only sets the position/rotation of the body, but also the scale of the shape. However, most objects do not change position/rotation/scale except once at initialization. The problem gets worse when there are moving meshes.

There are more details, but I think these are the most important ones.

So my question is:

  • Is this a common problem, and if it is, is there a solution?
  • I read that jbullet runs at 60fps and then interpolates any other frame; maybe there is a particular way of updating forces to prevent this problem? We are already using PhysicsTickListener.

    Any help is appreciated.


    EDIT: So it seems setAccuracy helped A LOT, and most of the problems were gone. :smiley: I’ll leave it for future reference.