I've been trying to track down an issue for a while in my game where the character "glitches" into walls while sliding against them. I'm using a time-of-impact query via Qbvh. It seemed to happen relatively consistently in roughly the same spots, so I collected position and velocity traces and came up with the following case that seems to 100% reproduce the issue. It appears the Qbvh TOI query inexplicably returns no intersections in cases where it definitely should.
Consider the following minimum reproducible example:
We get the expected results when invoking DefaultQueryDispatcher::time_of_impact() directly, but get no results when calling bvh.traverse_best_first(TOICompositeShapeShapeBestFirstVisitor) with the same data. However, if we tweak the ball's position slightly, we get the expected result in both cases:
let b_pos = na::Vector2::new(216.02324, -1632.0); // instead of (216.02324, -1632.0032)
I've been trying to track down an issue for a while in my game where the character "glitches" into walls while sliding against them. I'm using a time-of-impact query via
Qbvh
. It seemed to happen relatively consistently in roughly the same spots, so I collected position and velocity traces and came up with the following case that seems to 100% reproduce the issue. It appears theQbvh
TOI query inexplicably returns no intersections in cases where it definitely should.Consider the following minimum reproducible example:
As commented in the code, the above code results in the following console output:
We get the expected results when invoking
DefaultQueryDispatcher::time_of_impact()
directly, but get no results when callingbvh.traverse_best_first(TOICompositeShapeShapeBestFirstVisitor)
with the same data. However, if we tweak the ball's position slightly, we get the expected result in both cases:We then get the following output:
My
Cargo.toml
has