<!--
{
  "availability" : [
    "Reality Composer Pro: -",
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ComputeGraph",
  "identifier" : "/documentation/ComputeGraph/ComputeGraphSimulation/advance(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Compute Graph",
      "ComputeGraph"
    ],
    "preciseIdentifier" : "s:12ComputeGraph0aB10SimulationC7advanceyyAC13AdvanceParamsVF"
  },
  "title" : "advance(_:)"
}
-->

# advance(_:)

Advances the simulation by one time step, encoding all simulation
stage dispatches into the command buffer and encoder provided by `params`.

```
final func advance(_ params: ComputeGraphSimulation.AdvanceParams)
```

## Parameters

`params`

The advance parameters, including the time delta,
command buffer, compute encoder, and spatial transforms for this frame.

## Discussion

Call this once per frame from your render loop. The simulation reads
[`deltaTime`](/documentation/ComputeGraph/ComputeGraphSimulation/AdvanceParams/deltaTime) to determine how much simulated time to consume,
subject to [`simulationRate`](/documentation/ComputeGraph/ComputeGraphSimulation/simulationRate-swift.property). Spatial transforms and optional viewer
information in `params` are forwarded to the simulation graph.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)