dimforge / ncollide

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

Add some tweaks to improve robustness when using fixed-point numbers. #336

Closed sebcrozet closed 4 years ago

sebcrozet commented 4 years ago

This PR adds some tweaks to various collision-detection methods in order to improve their behavior when using fixed-point numbers. Because some of these modification may have a (slightly) negative performance impact, they are only enabled when the improved_fixed_point_support feature of ncollide is enabled.

In order to use ncollide with fixed-point numbers, it is strongly recommented to use at least 24 bits for the decimal part. Less accuracy may result in systematic failure of some algorithms.