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 Raycast reporting false positives and wrong distances #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

forestrf
Copy link

@forestrf forestrf commented Jun 3, 2019

Fix Raycast reporting false positives for rays that cross a bounding box but not the shape that is inside it, thanks to analyzing BEPU Physics raycasting source code.

The code used from BEPU is here:
https://github.com/bepu/bepuphysics1/blob/e0438719412e2eab8683d5ca65c1b0bb0e9b177a/BEPUphysics/CollisionTests/CollisionAlgorithms/GJK/GJKToolbox.cs#L347

This should or may fix this issue:
#19

This PR was originally https://github.com/mattleibow/jitterphysics/pull/29 but after removing the repository I encountered this bug isaacs/github#168 so I closed the previous PR to be able to update it. Here are the changes:

After reviewing https://github.com/bulletphysics/bullet3/blob/cdd56e46411527772711da5357c856a90ad9ea67/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp I was able to fix the raycast reporting wrong distances randomly by using lambda as fraction directly instead of calculating it.

@forestrf forestrf changed the title Patch 1 Fix Raycast reporting false positives Jun 3, 2019
@forestrf forestrf changed the title Fix Raycast reporting false positives Fix Raycast reporting false positives and wrong distances Jun 3, 2019
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