bevy_rapier icon indicating copy to clipboard operation
bevy_rapier copied to clipboard

Scaling Colliders made by convex decomposition by using Transform can sometimes fail

Open tomaspecl opened this issue 3 years ago • 0 comments

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 Snímek z 2022-07-02 17-00-33

scaled collider: Notice the right side of the cube mesh. The corner is absent. Snímek z 2022-07-02 17-00-41

tomaspecl avatar Jul 04 '22 13:07 tomaspecl