Trying to optimize SyncBodies/SyncPullResults

Hey everyone! We are looking for ways to optimize our client game thread time, and this section is what we are currently looking at.

[Image Removed]

For our game we have very little simulating bodies on the client (I think it actually might be zero). Debugging this time we have determined the overwhelming majority of it is spent on rigid kinematic bodies that are part of skeletal meshes - aka collision for skeletal meshes. For all of these UpdateKinematicFromSimulation is set to false, and the code in FSingleParticlePhysicsProxy::PullFromPhysicsState is seemingly not doing anything for these bones, which matches what I expect as the animation tick is what is moving them all. Best I can tell here we are spending a decent chunk of time in here doing nothing.

What I would love here is for Results.RigidInterpolations to not contain all of these things. I’m trying to track down why PullData.DirtyRigids has all of these rigid bodies (even ones that aren’t moving), but if anyone has any tips/thoughts here I’m all ears!

Thank you!

Steps to Reproduce

Found it! Changing `SyncKinematicOnGameThread` to 0 (P.Chaos.SyncKinematicOnGameThread) got all this time back!

Hi Ryan,

Ah - I was just about to start typing a response when I saw the above response!

Is this all fixed for you now?

Best

Geoff Stacey

Developer Relations

EPIC Games