---
title: direction
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uifieldbehavior/direction
---

# direction

The direction of motion for a linear field.

## Declaration

```swift
var direction: CGVector { get set }
```

## Discussion

Discussion Use this property to specify the direction of motion for velocity and linear gravity fields. For nondirectional fields, the default value of this property is a zero vector.

## See Also

### Configuring the field attributes

- [position](uikit/uifieldbehavior/position.md)
- [region](uikit/uifieldbehavior/region.md)
- [strength](uikit/uifieldbehavior/strength.md)
- [falloff](uikit/uifieldbehavior/falloff.md)
- [minimumRadius](uikit/uifieldbehavior/minimumradius.md)
- [smoothness](uikit/uifieldbehavior/smoothness.md)
- [animationSpeed](uikit/uifieldbehavior/animationspeed.md)
