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

collision event on Physijs children #51

Open
ghost opened this issue Oct 28, 2012 · 1 comment
Open

collision event on Physijs children #51

ghost opened this issue Oct 28, 2012 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 28, 2012

lets say you have a physijs cube made out of 6 physijs planes and a physijs sphere inside the cube. if you shake the cube, every time the sphere hits the inside face of the cube, a collision callback happens, but only if the sphere doesnt touch the cube again between collisions. so if the sphere rolls into a corner, no collision callback happens, as it never lost contact with the surface it was rolling on.

this could be fixed if the collision callback reset were dependent on a physijs child as opposed to the physijs object itself

@chandlerprall
Copy link
Owner

I don't think there is a way to determine which child a collision is with, just the parent shape. That said it is possible to report if there are more contacts than there were in the previous frame which would indicate a new collision - especially when dealing with a sphere. I'll play around with the collision reporting and find a good solution for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant