fastForward(stepCount:stepDeltaTime:)
Advances the particle simulation by multiple steps in a single operation.
Declaration
final func fastForward(stepCount: Int, stepDeltaTime: Float)Parameters
- stepCount:
The number of simulation steps to execute. Each step represents one iteration of the simulation update cycle. Must be positive.
- stepDeltaTime:
The time interval (in seconds) to use for each simulation step. This controls how much simulated time passes with each step. Smaller values provide more accurate simulation at the cost of requiring more steps to advance the same amount of time.
Discussion
This method performs batch simulation updates by executing multiple simulation steps consecutively within a single compute command buffer, skipping any non-simulation work such as updating the output buffers. This is useful for: