Shift Center of Mass during runtime

Hi everybody,

I’m trying to shift the center of mass of a skeletal mesh / its physics asset during runtime.

What I want to do:
I’d like to move the center of mass of a skeletal mesh / physics asset during runtime based on some gameplay statistics. In fact I want to have the same result as if I set the Center Of Mass Offset in the skeletal meshs Physics section. (blueprint defaults)

What I tried so far:
For now I tried to set the Center of Mass with SetCenterOfMass(FVector(x, y, z)) which should theoretically set the offset. I’m interpolating the given vector to get a smooth transition.

It seems to work, although there is one big problem: If I shift the CoM (without giving a bone so it picks the root bone) all the collision bodies of the Physics Asset shift with it which leads into wrong collisions. If I add a dummy bone and pass it into SetCenterOfMass(…) the collision stays in place but the call has no effect (I think because the dummy bone doesn’t have mass at all?).

If I change the Center of Mass offset in the Physics Section of the Blueprint the collision stays where it’s supposed to be so there should be a way to do it right.

Do I need to counter the CoM shift by shifting the collision bodies in the opposite direction or is there another way of moving CoM during runtime?

Hope you guys can help me.

Best Regards