FyroxEngine / Fyrox

3D and 2D game engine written in Rust
https://fyrox.rs
MIT License
7.64k stars 343 forks source link

Add support for Collider intersection check #382

Closed ThomasHauth closed 1 year ago

ThomasHauth commented 1 year ago

This PR adds support for Rapier3d's intersection check). This is needed to be able to use colliders which are in sensor mode. The existing Collider::contacts() only provides collisions on two non-sensor colliders.

This PR adds a new method Collider::intersects() to both the 2d and 3d Collider and adds respective unit tests.

mrDIMAS commented 1 year ago

Thanks for the PR, everything looks good! Could you please resolve conflicts? I'll merge this right after the resolve.

ThomasHauth commented 1 year ago

Thanks @mrDIMAS for having a look. I rebased the branch.