How to structure moving entities ?

Here is an extract from the trace. At each frame, entities following trajectories are heavily impacting the tick. [Image Removed]

Considering the very small ones on the far right, moving the entity is not the problem but its content…

Can you tell from this what we are doing wrong ?

[Attachment Removed]

Steps to Reproduce
Hi,

We are using advanced moving models / entities which are driven by an external simulation interface. They are likely to move every frame.

When reviewing traces we see that just moving the model has a serious impact triggered by the cascaded entity structure. What are the guidelines for creating such entities and how to avoid pitfalls / performances impacts ?

Thanks,

[Attachment Removed]

Hey there,

UpdateKinematicBonesToAnim is the update that ensures all the physics bodies associated with a mesh’s physics asset are in the right spot when things move. There is a bool you can use to defer the update until the end of the frame, which could be useful here and basically reschedule it so you don’t do it multiple times per frame. On the skeletal mesh component, make sure to check on Defer Kinematic Bone Update under SkeletalMesh->Advanced.

That said, the update is quite large, which suggests you have a ton of physics bodies in your physics asset set to kinematic. You might consider optimizing your physics bodies as well, or not setting your skeletal mesh to overlap in its collision profile. Ideally, your skeletal mesh doesn’t use a collision profile, and you use a simplified approximation elsewhere.

Dustin

[Attachment Removed]

Thanks Dustin for the pointer. I passed the information over to our content team and they were able to identify the faulty model for this.

How about the UpdateChildTransforms ? Based on the trace, this is all about our light points within the model. Is there any way to flag the components in such a way this does not lead to so many updates ?

[Attachment Removed]

Unfortunately, no, not for lights or light components. That cost you will need to pay. I wouldn’t recommend attaching lights to your skeletal mesh, but it depends on your use case and whether you could save costs by faking it.

Dustin

[Attachment Removed]