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

Closed
MikMikus opened this issue Aug 3, 2024 · 1 comment
Labels
A-Dynamics Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on C-Bug Something isn't working

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);
}
@Jondolf Jondolf added C-Bug Something isn't working A-Dynamics Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on labels Dec 8, 2024
@Jondolf
Copy link
Owner

Jondolf commented Dec 8, 2024

This seems to have been fixed by #574.

@Jondolf Jondolf closed this as completed Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Dynamics Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on C-Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants