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

Expose m_flags in RayResultCallback #368

Merged
merged 1 commit into from
May 18, 2021
Merged

Expose m_flags in RayResultCallback #368

merged 1 commit into from
May 18, 2021

Conversation

LeXXik
Copy link
Contributor

@LeXXik LeXXik commented May 3, 2021

When a raytest is performed, it may return the backface hit result:

var rayCallback = new Ammo.AllHitsRayResultCallback(start, end);
dynamicsWorld.rayTest(start, end, rayCallback);

Exposing the flag on the callback allows us to set it so that the backfaces are ignored:

var rayCallback = new Ammo.AllHitsRayResultCallback(start, end);
rayCallback.set_m_flags(1 << 0);
dynamicsWorld.rayTest(start, end, rayCallback);

This flag allows to filter out backfaces in raytests.
@kripken kripken merged commit 93e1152 into kripken:main May 18, 2021
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.

2 participants