I would like to predict the trajectories of certain bodies in my simulation and am considering
Simulation.StepImmediate. I looked at the pool example and largely got it to work. Im struggling a bit obtaining specific PhysicsWorlds though. For instance, I would like to have a PhysicsWorld that contains all static bodies and a specific subset of dynamic bodies. Any ideas on how to set this up?
You can create the other PhysicsWorld and control what goes into it. One option is to copy the bodies (and their motions) from the main PhysicsWorld.
Iād recommend looking at the UnityPhysicsSamples\Assets\Tests\SingleThreadedPhysics\Scripts\SingleThreadedPhysics.cs example.
1 Like