Static mesh component (physics enabled) missing in "Get Children Components"

Hi,

I’ve spotted a bug in the “Get Children Components” function of a root scene component. As you can see in the following image, the array of children does not contain all the scene component’s children. The static mesh component is clearly missing, only if “Simulate Physics” is on.

Any ways to fix this or work around it? (direct reference would not fix the problem in our case, we have inheritance)

Cheers.

Hey CyanBalloon,

I’ve been able to reproduce the issue and have entered a bug report, which you can track the status of here: Unreal Engine Issues and Bug Tracker (UE-35978)

As far as a workaround goes, you could try something like the picture below. I’m not sure how your setup is working, so it may not work in your case, but what I did was basically set the reference first and then set simulate physics to true. That way I already had a stored reference to the mesh. Hopefully that’ll work for you, but if not, I was unable to determine another way to work around it at this time.

Some of it may not be necessary depending on how many components you expect to be contained in the array (such as the check to see if it actually is the static mesh we’re looking for), but it may work in your case.

Thank you for your report and let me know if you have any further questions.

Have a great day

Hi Sean,

Thank you for entering the bug report!

At first, I thought your workaround could do it, but in our case, we need to flip flop the physics simulation on multiple objects that have multiple (number unknown) static mesh with physics on/off. So it is necessary to be able to see the static mesh comps that have physics on. What I could do with your idea, though, is create a reference array on construct, and fill it with the static mesh comps, and enable physics simulation afterward.

For now I’ll wait, but if it takes too much time, the workaround should work fine.

Thanks for your help, you have a great day too!

[Update]
It seems like it was designed that way. Oh well. I’ll have to work with the workaround.

So… it still happens in 4.19… someone with an workaround?

Hey WoolLeg,

This issue was marked as by design for the following reason:

When components start to simulate, they will detach from their parent, as simulation always is done in world space.

This is currently working as intended.