Implement RayCast for the Trimesh.

This commit is contained in:
Crozet Sébastien
2020-10-06 14:17:18 +02:00
parent 60c4d01e0a
commit 7c92848383
2 changed files with 54 additions and 2 deletions

View File

@@ -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)
}