---
title: sortResults
framework: scenekit
role: symbol
role_heading: Type Property
path: scenekit/scnhittestoption/sortresults
---

# sortResults

An option to sort the results of a hit-test.

## Declaration

```swift
static let sortResults: SCNHitTestOption
```

## Discussion

Discussion The value for this key is an NSNumber object containing a Boolean value. The default value is true, specifying that the array of hit-test results is sorted from nearest to farthest. (When using the hitTestWithSegment(from:to:options:) method, “nearest” is defined as closer to the point specified in the first parameter.) If you specify false, results are returned in an arbitrary order.

## See Also

### Deprecated

- [firstFoundOnly](scenekit/scnhittestoption/firstfoundonly.md)
