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

# force::twist

Applies a twisting force around a vertical axis through a specified origin point.

```
void force::twist(float3 origin, float strength, float attraction)
```

## Parameters

`origin`

The 3D point in world space around which the twist force is centered.

`strength`

The magnitude of the tangential (rotational) force. Higher values create stronger rotation.

`attraction`

The magnitude of the radial force. Positive values attract elements toward the origin,
while negative values repel elements away from the origin.

## Discussion

This function creates a vortex-like effect by applying two force components:
a tangential force that causes rotation around the origin, and an optional
attractive or repulsive force toward or away from the origin. The twist occurs
around a vertical (Y-axis) through the specified origin point.

> Visual: ![Graph](force__twist)

---

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)