CenterOfMass in my rig parts different from (0,0,0)

NOTE: I AM USING AN HYBRID SKINNED / DEFORM RIG (similar to ROBLOX’s Lola rig)

When importing my rig, each mesh has a CenterOfMass assigned different from 0,0,0, which is causing undesired results when simulating ragdoll physics paired with impulses on my rig.

Back in 17/05/2024, I imported a custom rig in which each of the bodyparts had CenterOfMass at 0,0,0.
Now, I’ve reimported that same .fbx today and each part has different CenterOfMass assigned in each, suggesting that there were changes in the importing system (?)

Say for example, the Head mesh in my rig is now (-0.015, 0.006, 0.077) at a certain size (the center of mass changes when the mesh size changes), when back then it would be (0,0,0) regardless of the size of the part.

Expected behavior

I want to achieve a CenterOfMass of 0,0,0 in all of my rig parts, so the physics in my rig can be more predictable (say I’m impulsing my player forward during a ragdoll, in which the parts of my rig will simulate physics & have mass even when massless = true, the CenterOfMass affects my impulse and how the parts will behave in the ragdoll while the player is being launched)

How can I make them have 0,0,0 center of mass? I’ve tried reimporting the rig, setting the origins to 0,0,0, anything I could try, but no luck. Moving away the meshes in the 3D Program also showed that it did not affect teh center of mass, it’s as if the center of mass depended in the mesh poly itself rather than positioning/origins.

tbh idk, i don’t mess with ragdolls. Ima just leave this to you bro :speaker_high_volume:

Yes indeed we fixed the center of mass calculations. They were previously wrong.

The ApplyImpulse API applies the impulse at the center of mass even if it’s not at 0,0,0 so it should not be an issue.

My concern was that my old rig, while having a CenterOfMass in every body part in (0,0,0), it gave me the desired results when pushing it around with impulses during a ragdoll (with BallSocketConstraints).

Now that the calculation of these centers of mass have changed, I’ve tried to replicate the same behavior I used to have long time ago (I’ve made the masses exactly the same as before too, because the way mass is calculated changed too with the update), yet it gives me different results, of which I’m confident that have to do with the CenterOfMass in each bodypart being different and thus my ragdoll behaving differently in impulses.

Basically, I just wanted to know if it is possible to achieve a (0,0,0) CenterOfMass on my rig parts when they are skinned, because I do get the desired center of mass when importing the rig without an armature into ROBLOX, but this is not possible when the rig comes with an armature skinned (I use the same method as how ROBLOX’s Lola rig is imported, a bone rig whose geometry is separated into the traditional R15 parts divison & nomenclature, then imported into ROBLOX so the parts have Motor6Ds & deformation)

Hi Tamer,

As @chefdeletat said, we changed some of the logic around mass properties upon importing to fix previous bugs. Unfortunately, we cannot guarantee same behavior as something from the past and we also don’t allow manually overriding Center of Mass.

Nonetheless, as @chefdeletat said, impulses are applied at COM so you should be able to achieve similar behavior as before. You may need to adjust the parts slightly if you’re seeing slightly different behavior. We’ll close this ticket for now, but feel free to send a private message with a repro file if you cannot figure out how to get similar enough behavior, we’ll try to help though we can’t guarantee anything.

best,
M0bsterLobster

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.