Jondolf / avian

ECS-driven 2D and 3D physics engine for the Bevy game engine.
https://crates.io/crates/avian3d
Apache License 2.0
1.38k stars 108 forks source link

Negative scales coming from an ancestor are ignored by colliders #471

Open janhohenheim opened 1 month ago

janhohenheim commented 1 month ago

My hierarchy looks something like this:

This is my setup using Blenvy. The black lines are previews of the colliders. image

But the result in Bevy looks like this: image

As you can see, the negative x scale is ignored.

Note that this feature is necessary to properly mirror items.

janhohenheim commented 1 month ago

Updated the title because this also happens with positive scales. Using a similar hierarchy to the fire exit, this is what happens when the collection instance has a scale of 1: image

But now we scale it by this: image

And we see that the collider is not scaled along with the mesh: image

For reference, a collection instance looks like this in Blender: image

Which references this data: image

Jondolf commented 1 month ago

472 fixes the second case with the building's collider not being scaled. The mirroring bug for negative scales is a separate issue.

janhohenheim commented 1 month ago

Updated the title now that the non-negative case is fixed.