Performance will drop in PIE if simulate physics is toggled rapidly on an actor with attached components
Simulating physics for Primitive components causes severe performance drop if simulation is paused, object is moved (using set location) and simulation is restarted. The performance drop accumulates each time the simulation is resumed.
Steps to Reproduce:
Spawn an actor with primitive component as root (typically a static mesh).
Weld attach a few other primitive components to the root primitive component
Setup logic so that a key press toggles simulate physics option for the root component
Now enable simulation then stop it , start it and then again stop it, very soon there is a huge performance drop that increases with each time simulate physics is enabled
1. Open the attached project
3. Hold down the 'F' key and watch the FPS
4. Once you see the FPS drop into the double digits, toggle 'F' so physics stays simulated
Results: The more the physics is toggled, the more the FPS will drop (This does not happen in a Standalone Game)
Expected: To maintain the projects average FPS no matter how many times physics is toggled
Head over to the existingAnswerHub thread and let us know what's up.