Creates a constraint that keeps a node within a certain distance of a point in another node’s coordinate system.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
The range of allowed distances.
The point to use as the target point.
The node whose coordinate system the point is specified in.
A new constraint.
Each time when constraints are applied, a line is projected between the node’s position and the target point. The distance between the two points is calculated, and if it lies outside the specified range, the node is pushed or pulled along this line until it lies within the range.