Add cone support.

This commit is contained in:
Crozet Sébastien
2020-10-20 14:16:01 +02:00
parent 865ce8a8e5
commit d513c22d33
15 changed files with 257 additions and 18 deletions

View File

@@ -76,7 +76,9 @@ impl ContactDispatcher for DefaultContactDispatcher {
| (ShapeType::Capsule, ShapeType::Ball)
| (ShapeType::Ball, ShapeType::Capsule)
| (ShapeType::Cylinder, ShapeType::Ball)
| (ShapeType::Ball, ShapeType::Cylinder) => (
| (ShapeType::Ball, ShapeType::Cylinder)
| (ShapeType::Cone, ShapeType::Ball)
| (ShapeType::Ball, ShapeType::Cone) => (
PrimitiveContactGenerator {
generate_contacts: super::generate_contacts_ball_convex,
..PrimitiveContactGenerator::default()
@@ -99,7 +101,10 @@ impl ContactDispatcher for DefaultContactDispatcher {
None,
)
}
(ShapeType::Cylinder, _) | (_, ShapeType::Cylinder) => (
(ShapeType::Cylinder, _)
| (_, ShapeType::Cylinder)
| (ShapeType::Cone, _)
| (_, ShapeType::Cone) => (
PrimitiveContactGenerator {
generate_contacts: super::generate_contacts_pfm_pfm,
..PrimitiveContactGenerator::default()