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

Heightfields with negative values will fire face normal errors #45

Closed
rogerscg opened this issue Jul 24, 2020 · 6 comments
Closed

Heightfields with negative values will fire face normal errors #45

rogerscg opened this issue Jul 24, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@rogerscg
Copy link

rogerscg commented Jul 24, 2020

To reproduce, change all heightfield data points in the heightfield.html demo to -5. You will see 1,000+ errors thrown from ConvexPolyhedron when computing convex triangle pillars.

This was also an issue from 2014: schteppe#149

@rogerscg
Copy link
Author

The failure to collide might just be due to lack of CCD, not a heightfield issue. Removing that part of the issue (though still a big issue).

@rogerscg rogerscg changed the title Heightfields with negative values will fire face normal errors and fail to collide with objects Heightfields with negative values will fire face normal errors Jul 24, 2020
@rogerscg
Copy link
Author

I found the issue, which stems from the convex triangle pillar being upside down when the heightfield has a negative value. Will send a PR in the next few minutes.

@codynova
Copy link
Member

Awesome, great work digging in and hunting down the issue. I'll cut a quick release with your fix.

@codynova
Copy link
Member

I've published a new version of cannon-es with the fix to heightfields cannon-es@0.15.1

@rogerscg
Copy link
Author

Awesome, thanks for being so responsive.

@codynova codynova added the bug Something isn't working label Jul 25, 2020
@codynova
Copy link
Member

Absolutely, we welcome any further contributions 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants