<!--
{
  "availability" : [
    "Reality Composer Pro: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ComputeGraph",
  "identifier" : "/documentation/ComputeGraph/force/add",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Compute Graph"
    ],
    "preciseIdentifier" : "force::add"
  },
  "title" : "force::add"
}
-->

# force::add

Adds a constant force vector to the current element.

```
void force::add(float3 force)
```

## Parameters

`force`

The 3D force vector to add to the element.

## Discussion

This function applies a specified force to the element by adding it to the
force accumulator. Multiple forces can be combined by calling this function
(or other force functions) multiple times during simulation.

> Visual: ![Graph](force__add)

---

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)