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

Comments

@stephengold
Copy link
Contributor

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 added a commit that referenced this issue Jun 18, 2019

@stephengold stephengold self-assigned this Jun 18, 2019

stephengold added a commit that referenced this issue Jun 18, 2019

@stephengold

This comment has been minimized.

Copy link
Contributor Author

commented Jun 19, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.