Ncollide max_toi

In the latest ncollide, ray collision methods have a new argument, max_toi. Is this due to some optimization or are there shapes for which not specifying this would fail finding collisions?

Is there any recommended value if one wants to avoid specifying this value, like f32::MAX or would that be problematic?



This new parameter is for optimization purposes. If you are not interested at time-of-impacts greater than the given value, then some shape (like triangle meshes for example) can stop searching for intersections beyond this limit.

Setting this value to f32::MAX is indeed the correct way to get the same behavior as when we did not have this parameter.

Ok thanks! perhaps if this is only for optimization purposes having this parameter as an Option or even Into<Option<>> would make the api more intuitive. Also you probably know already but the examples in the user guide still use the old syntax