Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heightfield collision shapes don't match TerrainQuad #1125

Closed
stephengold opened this issue Jun 17, 2019 · 1 comment
Closed

heightfield collision shapes don't match TerrainQuad #1125

stephengold opened this issue Jun 17, 2019 · 1 comment
Assignees
Labels
defect Something that is supposed to work, but doesn't. Less severe than a "bug" Physics Issues with all kinds of Physics and their Bindings
Milestone

Comments

@stephengold
Copy link
Member

stephengold commented Jun 17, 2019

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.

@stephengold
Copy link
Member Author

I verified the fix using TestIssue1125.java and jme3-bullet. I still don't know whether jme3-jbullet has this issue or not. If it does, either re-open this issue or open a new issue.

@stephengold stephengold modified the milestones: v3.3.0, v3.2.4 Jun 19, 2019
@stephengold stephengold added the defect Something that is supposed to work, but doesn't. Less severe than a "bug" label Sep 19, 2019
@stephengold stephengold added the Physics Issues with all kinds of Physics and their Bindings label Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Something that is supposed to work, but doesn't. Less severe than a "bug" Physics Issues with all kinds of Physics and their Bindings
Projects
None yet
Development

No branches or pull requests

1 participant