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

Add shapecast example + loosen gjk epsilon #298

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

Conversation

Vrixyz
Copy link
Contributor

@Vrixyz Vrixyz commented Dec 17, 2024

Following discussion on discord, a shape cast of a ball sometimes fails when it should not.

Before this PR:

Screenshot from 2024-12-17 13-59-57

After this PR:

image

@Vrixyz Vrixyz changed the title heavy wip ; I could reproduce a wrong shapecast 🤔 Add shapecast example + loosen gjk epsilon Dec 18, 2024
@Vrixyz Vrixyz requested a review from sebcrozet December 18, 2024 08:25
Comment on lines 36 to 39
pub fn eps_tol() -> Real {
let _eps = crate::math::DEFAULT_EPSILON;
_eps * 10.0
_eps * 10_000.0
}
Copy link
Contributor Author

@Vrixyz Vrixyz Dec 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a huge fan of increasing epsilons arbitrarily, but that improves the example added in this PR.

I think exposing this value would be more interesting, and I'd like to have a test stressing false positive, where a high epsilon results in an incorrect result 🤔 (or performance overhead, I'm not sure)

Comment on lines +22 to +28
[
[600.0, 288.0].into(),
[576.0, 312.0].into(),
[552.0, 288.0].into(),
[576.0, 264.0].into(),
]
.into(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if that works on a centered shape.

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