bevy_xpbd
bevy_xpbd copied to clipboard
Incorrect CenterOfMass for ColliderConstructorHierarchy with scale up transform
trafficstars
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)).
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);
}