aboutsummaryrefslogtreecommitdiff
path: root/src/geometry/collider.rs
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2020-10-06 14:17:18 +0200
committerCrozet Sébastien <developer@crozet.re>2020-10-06 14:17:18 +0200
commit7c92848383b9f76bde010f00683a44453b2b456a (patch)
tree14a8ab8e4f592fa790ac31b5995e552501ba4463 /src/geometry/collider.rs
parent60c4d01e0a756ce0af142ac698fd0adcb8c22042 (diff)
downloadrapier-7c92848383b9f76bde010f00683a44453b2b456a.tar.gz
rapier-7c92848383b9f76bde010f00683a44453b2b456a.tar.bz2
rapier-7c92848383b9f76bde010f00683a44453b2b456a.zip
Implement RayCast for the Trimesh.
Diffstat (limited to 'src/geometry/collider.rs')
-rw-r--r--src/geometry/collider.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/geometry/collider.rs b/src/geometry/collider.rs
index 183446b..23345f7 100644
--- a/src/geometry/collider.rs
+++ b/src/geometry/collider.rs
@@ -132,7 +132,9 @@ impl Shape {
Shape::Triangle(triangle) => {
triangle.toi_and_normal_with_ray(position, ray, max_toi, true)
}
- Shape::Trimesh(_trimesh) => None,
+ Shape::Trimesh(trimesh) => {
+ trimesh.toi_and_normal_with_ray(position, ray, max_toi, true)
+ }
Shape::HeightField(heightfield) => {
heightfield.toi_and_normal_with_ray(position, ray, max_toi, true)
}