Download

Physics simulation

Here’s what I’m trying to do in C++:
Create a few objects that can interact physically. (easily done)
Create copies of those objects that are hidden in the game and that interact with the other copies but not the originals. (read about “use async scene” and figured that was exactly what I needed)

The copies are hidden but will be used to simulate interactions between the originals whilst not actually disturbing the originals.
I had gotten a version of this to sort of work in Blueprints by spawning the copies every tick, performing the simulations and then destroying them. This seems like a waste when I can just keep the copies hidden and only interact with other copies in the level. Thing is I can’t find a single solid example on how to do this. I’ve enabled the use of async scene in the project settings but I can’t seem to programmatically change the value of bUseAsyncScene.

Is what I want to do possible or should I revert to spawning copies every tick?

I’m probably missing something here, what’s the point of that?

So I’m basically trying to provide a future trajectory for the original bodies. It works fairly well when I set it up in Blueprints but its not 100% accurate because I couldn’t get AddImpulse to give an immediate change and my custom impulse function is not giving me the accuracy I expected, and it’s also not super efficient because of the constant spawning and destroying of these clones (and also cos you can’t parallel compute using Blueprints apparently). So I moved back to C++ with this new concept with the hope I could get it working but now I’m a little stuck with getting this async scene to work.
I hope this explains my intentions better.