Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect CenterOfMass for ColliderConstructorHierarchy with scale up transform #479

Open
MikMikus opened this issue Aug 3, 2024 · 0 comments

Comments

@MikMikus
Copy link

MikMikus commented Aug 3, 2024

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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant