---
title: "force::twist"
framework: Compute Graph
role: symbol
role_heading: Function
platforms: [iOS 27.0+, iPadOS 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: computegraph/force/twist
---

# force::twist

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

## Declaration

```swift
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

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. note:
