dimforge / ncollide

2 and 3-dimensional collision detection library in Rust.
https://ncollide.org
Apache License 2.0
921 stars 105 forks source link

Panic with continuous collision detection with HeightMap in time_of_impact #324

Open e00E opened 4 years ago

e00E commented 4 years ago

https://github.com/rustsim/ncollide/blob/a834dfd986a48f0c5bb27745a60e1c08e70e993d/src/query/time_of_impact/time_of_impact.rs#L150 This is triggered in nphysics by having a height map collider and for example a ball on which ccd is enabled. From an api perspective it is weird that the function would panic instead of returning an error if the case cannot be handled. This is probably known to the author seeing as ccd is supported for TriMesh through as_support_map and that a similar implementation was started for height map but commented out. Having the issue it might help other users.