Is this a 5.4 Bug with linear velocity?

I am having problems getting linear velocity of a moving skeletal mesh bone in 5.4. However using the same blueprint nodes in 5.3.2 works as expected.

To reproduce: Using the default third persons game template with the following entry in the BP_ThirdPersonCharacter blueprint, 5.3.2 the velocity vector is printed with the expected values, however in 5.4 the result is always 0 0 0 velocity. Is this a bug or has something changed in 5.4 that might be causing this? Thanks.

3 Likes

I’ve since tested this on a simple StaticMeshActor (SM_ChamferCube) and the velocity is returned correctly in 5.4, so the issue must be in relation to getting the velocity of the actual skeletal mesh bone. Below is another (more simple) example that works in fine 5.3.2, but not in 5.4.0…

Still can’t confirm if this is a bug or related to a change that I can’t find info on.

1 Like

I can consistently reproduce the same issue

1 Like

Same issue for me, the function returns something only if the bone simulates physics. There may have been a change with UE 5.4, if this is the case how to recover the velocity of a bone (which does not simulate physics) ?

1 Like

try

Mesh->GetBodyInstance()->SetUpdateKinematicFromSimulation(true);

3 Likes

That worked! Thanks

That worked! Thanks!