bevy_xpbd icon indicating copy to clipboard operation
bevy_xpbd copied to clipboard

Incorrect CenterOfMass for ColliderConstructorHierarchy with scale up transform

Open MikMikus opened this issue 1 year ago • 0 comments

When i load gltf model with scale up transform and use ColliderConstructorHierarchy, automatically added CenterOfMass for whole entity is posited outside model.

See collider_constructors example and change .with_scale(Vec3::splat(2.0)) to eg. .with_scale(Vec3::splat(10.0)).

obraz

Update: I'm not sure, but looks like this doesn't work as expected:

if !collider.is_added() {
    mass_properties -=
        collider_mass_properties.transformed_by(&previous_collider_transform);
}

MikMikus avatar Aug 03 '24 22:08 MikMikus