Skip to content

heightfield collision shapes don't match TerrainQuad #1125

@stephengold

Description

@stephengold

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.

Metadata

Metadata

Assignees

Labels

PhysicsIssues with all kinds of Physics and their BindingsdefectSomething that is supposed to work, but doesn't. Less severe than a "bug"

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions