We have a need to place actors using a physics simulation and pressing ‘K’ to Keep Simulation Changes. However in complex WP levels the wait for Simulate to start becomes unacceptable. (Even when overriding the game mode, limiting what’s loaded, etc.)
Is there a way to only simulate selected actors against the current actors loaded in the editor? We were going to dig into how the Blueprint and Physics Asset Editor do this and attempt something similar, but we wanted to make sure we weren’t missing anything obvious.
Thanks!
Hi Sora,
That is a very interesting question.
Could I clarify this line please? "Is there a way to only simulate selected actors against the current actors loaded in the editor? " - Isn’t this the default behaviour?
All the best
Geoff Stacey
EPIC Games
Hi Geoff!
So I’m guessing it’s possible to get the persistent level world to tick physics outside of SIE/PIE by calling into the right methods. Say to get a cube to fall and tumble around the loaded world. I haven’t figured out that part yet but I would assume it’s workable.
To your point, yes, everything in the persistent level is still loaded into the Chaos scene even outside of PIE/SIE, that’s great.
However, say we’ve got 100 actors, each with “Simulate physics” set to true loaded in the level. I don’t want all of them to tick when I tick the physics scene, just the ones I’ve selected.
I’m guessing we’d either have to:
- Selectively remove the actors from the chaos scene (or set their “Simulate Physics” flag to false)
- Create a new, headless chaos scene (I’m looking at `HeadlessChaosTestPhysicsScene.cpp` for examples), load in the selected actors, and tick that scene.
Hi Sora,
I’ve just had a thought on this - what about using a level instance - or some kind or ‘sim area’? This would automatically take care of the loading etc - but you’d need to move the actors of interest there manually.
That aside either looping through objects and selecting the enable simulation could also speed up the process?
As you say we do have the capability of altering a single asset - but not a default system where we can select a subset.
Best
Geoff
Hi Geoff, thanks for reaching out.
We actually solved this.
We noticed that while in the editor mode (and not running PIE/SIE), physics still ticks, but at a zero DT so nothing simulates.
We were able to override this by branching away from some logic in FPhysScene_Chaos::OnStartFrame that overrides the DT to zero. We just made sure that we iterate through everything in the scene not selected and turn off their physics before turning on the bypass.
Worked like a charm!
Aha - nice! No worries and apologies it took a while to respond, I’ll get this ticket closed off in that case, but please do reach out if we can help further 
Geoff