dimforge / bevy_rapier

Official Rapier plugin for the Bevy game engine.
https://rapier.rs
Apache License 2.0
1.22k stars 259 forks source link

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

Closed tomaspecl closed 3 months ago

tomaspecl commented 2 years ago

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

Vrixyz commented 3 months ago

Thanks for the report! A reproduction code would be appreciated ; We'll want to evaluate if the problem belongs in parry.

tomaspecl commented 3 months ago

Well as far as I know this does not happen anymore. I just tested that and I am not having these problems. That bug is almost 2 years old so I guess it got fixed at some point.