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

Fix: b2CollideSegmentAndCapsule should pass manifold parameter to b2CollideCapsules #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mikuso
Copy link
Contributor

@mikuso mikuso commented Feb 20, 2025

This PR fixes the b2CollideSegmentAndCapsule function.

Explanation:

It seems to me that b2CollideCapsules was changed from the original in that it performs an in-place modification of the manifold parameter, rather than creating & returning a new one. (I assume this is for performance reasons?)

However, it looks like b2CollideSegmentAndCapsule, a function which was also modified from the original (seemingly with the same intent), does not correctly pass the manifold parameter through to the b2CollideCapsules function it depends upon.

This fixes that.

Additionally:

This also corrects an erroneous call to manifold.clear() with a parameter (0) which is seemingly inert and unnecessary, as this function does not accept any parameters.

…ollideCapsules

Also, manifold.clear() should not accept a parameter.
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

Successfully merging this pull request may close these issues.

1 participant