dimforge / ncollide

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

Add a maximum TOI limit to every ray-cast queries. #321

Closed sebcrozet closed 4 years ago

sebcrozet commented 4 years ago

This is a breaking changes that adds a max_toi parameter to every ray-cast queries. This will cause ray-cast queries to return None if the time of impact of the ray with the queried shape is greater than max_toi.

In other words, if the first hit of the ray with the shape is further than ray.orig + ray.dir * max_toi, then None is returned.

This PR also fixes the CI build for WASM.