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

continuousCollide does not reset the ContinuousCollisionResult struct? #117

Closed
schmrlng opened this issue Apr 5, 2016 · 3 comments
Closed

Comments

@schmrlng
Copy link
Contributor

schmrlng commented Apr 5, 2016

I've noticed that running continuousCollide with the same pre-allocated ContinuousCollisionResult struct will have result.is_collide stuck on true after it is used with colliding inputs. Without diving too much into the details of the "real" implementation, it seems that at least the code for the naive solution doesn't make any effort to clear the results struct (i.e. set is_collide = false). Is this intended behaviour?

@sherm1
Copy link
Member

sherm1 commented Apr 10, 2016

I think this is a bug. The less-naive methods do set the flag to false when there is no collision. I'll submit a fix.

@sherm1
Copy link
Member

sherm1 commented Apr 10, 2016

@schmring, please review PR #123 to see if it fixes your problem. I only changed the behavior of the naive method.

@schmrlng
Copy link
Contributor Author

Yup, that PR looks good to me.

@sherm1 sherm1 closed this as completed in 3fb8423 Apr 10, 2016
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

2 participants