bevy_rapier
bevy_rapier copied to clipboard
Scaling Colliders made by convex decomposition by using Transform can sometimes fail
I have a problem with scaling a collider by changing the Transform scale. When the scale is (1.0,1.0,1.0) it is fine. But when I change the scale even a little bit then a part of the collider disapears. When I change the scale again to (1.0,1.0,1.0) it apears again. I am using bevy_inspector_egui to change it at runtime and watch the changes but it is broken even when I spawn the entity with the scaled Transform and Collider and RigidBody at the same time.
it is printing an error:
ERROR bevy_rapier3d::geometry::shape_views::collider_view: Failed to apply scale [1.01, 1, 1] to ConvexPolyhedron shape.
I have screenshots of the collider (cube at the bottom) which is made from smaller parts (convex decomposition) and also the player and player collider visible (capsule shape) on top of the cube. The bevy_inspector_egui window is visible with the collider entity.
unscaled collider

scaled collider: Notice the right side of the cube mesh. The corner is absent.
