---
title: vortex()
framework: scenekit
role: symbol
role_heading: Type Method
path: scenekit/scnphysicsfield/vortex()
---

# vortex()

Creates a field whose forces circulate around an axis.

## Declaration

```swift
class func vortex() -> SCNPhysicsField
```

## Return Value

Return Value A physics field object. To use the field in a scene, attach it to the physicsField property of an SCNNode object.

## Discussion

Discussion The force on an object in a vortex field is tangential to the line from the object’s position to the field’s axis and proportional to the object’s mass. (The field’s axis is a line that is parallel to its direction vector and that passes through its center. For details, see the offset property.) For example, when a vortex field’s area of effect contains many objects, the resulting scene resembles a tornado: The objects simultaneously revolve around and fly away from the field’s center. By default, a vortex circulates counterclockwise relative to its direction vector. To make it circulate clockwise, set the field’s strength property to a negative value. The default falloffExponent value for a vortex field is 0.0, indicating that the field’s effect is constant throughout its area of effect.

## See Also

### Creating Physics Fields

- [drag()](scenekit/scnphysicsfield/drag().md)
- [radialGravity()](scenekit/scnphysicsfield/radialgravity().md)
- [linearGravity()](scenekit/scnphysicsfield/lineargravity().md)
- [noiseField(smoothness:animationSpeed:)](scenekit/scnphysicsfield/noisefield(smoothness:animationspeed:).md)
- [turbulenceField(smoothness:animationSpeed:)](scenekit/scnphysicsfield/turbulencefield(smoothness:animationspeed:).md)
- [spring()](scenekit/scnphysicsfield/spring().md)
- [electric()](scenekit/scnphysicsfield/electric().md)
- [magnetic()](scenekit/scnphysicsfield/magnetic().md)
