public void SimulateStep(float stepTime) { foreach (ObiActor actor in actors) { actor.OnSolverStepBegin(); } // Trigger event right after actors have fixed their particles in OnSolverStepBegin. if (OnFixedParticlesUpdated != null) { OnFixedParticlesUpdated(this, null); } // Update all collider and rigidbody information, so that the solver works with up-to-date stuff. // This is only actually done for the first solver that calls it this step. if (colliderGroup != null) { colliderGroup.UpdateBodiesInfo(this); } ObiArbiter.FrameStart(); // Update the solver (this is internally split in tasks so multiple solvers can be updated in parallel) Oni.UpdateSolver(oniSolver, stepTime); // Wait here for all other solvers to finish, if we are the last solver to call this. ObiArbiter.WaitForAllSolvers(); }
public void SimulateStep(float stepTime) { Oni.ClearDiffuseParticles(oniSolver); if (OnStepBegin != null) { OnStepBegin(this, null); } foreach (ObiActor actor in actors) { actor.OnSolverStepBegin(); } // Update Oni skeletal mesh skinning after updating animators: Oni.UpdateSkeletalAnimation(oniSolver); // Trigger event right after actors have fixed their particles in OnSolverStepBegin. if (OnFixedParticlesUpdated != null) { OnFixedParticlesUpdated(this, null); } ObiArbiter.FrameStart(); // Update the solver (this is internally split in tasks so multiple solvers can be updated in parallel) Oni.UpdateSolver(oniSolver, stepTime); // Wait here for all other solvers to finish, if we are the last solver to call this. ObiArbiter.WaitForAllSolvers(); }