Hello, after switching to 4.13 I’ve noticed SetRelativeLocation causing extreme slowdown.
I have a spline here with about 40 planks on it. Code sways the spline (like wind is blowing it) and on the Tick update, it moves the planks to the spline.
This used to be perfectly fine, but now it seems moving 40 static meshes in a tick update brings my FPS from 60 to 2. Unless I’m doing something wrong here?
(Note: I’ve tried disabling many things, and the AddedStaticObjects[i]->SetRelativeLocation(loc1) is the main cause)
There’s 3 of these bridges in the scene with about 40, 30, 20 planks in each respectively. But a 97% decrease in framerate from ~100 moving static meshes doesn’t seem right.
I can suggest looking at the Content Examples, specifically the Particle Effects and Elemental Demo, which use a material that uses “World Position Offset” to change the material, to make it look as if they are swaying. (Look at the bridges and rope)
Thank you for submitting a bug report, however at this time we believe that the issue you are describing is not actually a bug with the Unreal Engine, and so we are not able to take any further action on this. If you still believe this may be a bug, please provide steps for us to reproduce the issue, and we will continue our investigation.
Hi,
The problem was actually with Static Meshes following a spline, however I just tried it in a new project and got the same results as you.
I’m not sure why I get such a dramatic performance drop in my current project using the exact same method (although it’s been working fine since 4.10). If I find a proper reproduction method I’ll update this post. Thanks for your quick reply though!
Also if it makes a difference, the StaticMeshes are being created using:
CreationMethod = EComponentCreationMethod::Instance as it was the only one that displayed the components in the details panel.