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

shapeOverlapKeeper and heightfield pillars #283

Open
yrns opened this issue May 3, 2016 · 2 comments
Open

shapeOverlapKeeper and heightfield pillars #283

yrns opened this issue May 3, 2016 · 2 comments

Comments

@yrns
Copy link

yrns commented May 3, 2016

shapeOverlapKeeper doesn't work with heightfield pillars because the map of ids to shapes doesn't include the pillars. This results in an exception in emitContactEvents. The OverlapKeeper could use the override shape (the heightfield) or the map could include the pillars. I would prefer the latter. You can always get the heightfield from the bodyA/B ref in the events. I can submit a PR.

@schteppe
Copy link
Owner

schteppe commented May 3, 2016

Great! I'd love a PR. I wonder why I didn't set the override shapes in the first place?
Why would the pillars do any good in the map?

@yrns
Copy link
Author

yrns commented May 3, 2016

You mean why would I want the contact event to report the pillar and not the Heightfield shape? I would like to know which particular part of the heightfield I'm touching. Would you prefer to only get one begin/endShapeContant pair for each heightfield shape or each pillar? (Or both?) I can submit what I have. This isn't a unique issue. Box shapes report a different (unmapped) convex representation.

Thank you for adding the OverlapKeeper, by the way. I was able to remove a bunch of redundant code of my own, which is always fun!

yrns added a commit to yrns/cannon.js that referenced this issue May 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants