@@ -381,26 +381,24 @@ impl ColliderShapeDesc {
381
381
ColliderShapeDesc :: Trimesh ( TrimeshDesc )
382
382
} else if shape. as_heightfield ( ) . is_some ( ) {
383
383
ColliderShapeDesc :: Heightfield ( HeightfieldDesc )
384
+ } else if let Some ( cylinder) = shape. as_cylinder ( ) {
385
+ ColliderShapeDesc :: Cylinder ( CylinderDesc {
386
+ half_height : cylinder. half_height ,
387
+ radius : cylinder. radius ,
388
+ } )
389
+ } else if let Some ( round_cylinder) = shape. as_round_cylinder ( ) {
390
+ ColliderShapeDesc :: RoundCylinder ( RoundCylinderDesc {
391
+ half_height : round_cylinder. base_shape . half_height ,
392
+ radius : round_cylinder. base_shape . radius ,
393
+ border_radius : round_cylinder. border_radius ,
394
+ } )
395
+ } else if let Some ( cone) = shape. as_cone ( ) {
396
+ ColliderShapeDesc :: Cone ( ConeDesc {
397
+ half_height : cone. half_height ,
398
+ radius : cone. radius ,
399
+ } )
384
400
} else {
385
- if let Some ( cylinder) = shape. as_cylinder ( ) {
386
- ColliderShapeDesc :: Cylinder ( CylinderDesc {
387
- half_height : cylinder. half_height ,
388
- radius : cylinder. radius ,
389
- } )
390
- } else if let Some ( round_cylinder) = shape. as_round_cylinder ( ) {
391
- ColliderShapeDesc :: RoundCylinder ( RoundCylinderDesc {
392
- half_height : round_cylinder. base_shape . half_height ,
393
- radius : round_cylinder. base_shape . radius ,
394
- border_radius : round_cylinder. border_radius ,
395
- } )
396
- } else if let Some ( cone) = shape. as_cone ( ) {
397
- ColliderShapeDesc :: Cone ( ConeDesc {
398
- half_height : cone. half_height ,
399
- radius : cone. radius ,
400
- } )
401
- } else {
402
- unreachable ! ( )
403
- }
401
+ unreachable ! ( )
404
402
}
405
403
}
406
404
0 commit comments