Create a TerrainQuad and then generate a CollisionShape from it using CollisionShapeFactory. The diagonals of the mesh will run one direction, and the diagonals of the HeightfieldCollisionShape grid will run the other direction. This is most noticeable for small heightfields (2x2, ideally) with large differences in height between adjacent grid points.
An easy workaround would be to set flipQuadEdges = true in HeightfieldCollisionShape.createCollisionHeightfield(), but unfortunately there's no mechanism to do this in jMonkeyEngine.
The issue is present in current master-branch jme3-bullet; I haven't tested jme3-jbullet yet.
Create a
TerrainQuadand then generate aCollisionShapefrom it usingCollisionShapeFactory. The diagonals of the mesh will run one direction, and the diagonals of theHeightfieldCollisionShapegrid will run the other direction. This is most noticeable for small heightfields (2x2, ideally) with large differences in height between adjacent grid points.An easy workaround would be to set
flipQuadEdges = trueinHeightfieldCollisionShape.createCollisionHeightfield(), but unfortunately there's no mechanism to do this in jMonkeyEngine.The issue is present in current master-branch
jme3-bullet; I haven't testedjme3-jbulletyet.