Searches the Scene Kit scene for objects corresponding to a point in the rendered image.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
A point in the viewport coordinate system of the SpriteKit node.
A dictionary of options affecting the search. See Hit Testing Options Keys for acceptable values.
An array of
SCNHit objects representing search results.
A point in the SpriteKit node’s 2D viewport coordinate space can refer to any point along a line segment in the 3D SceneKit coordinate space. Hit-testing is the process of finding elements of a scene located along this line segment. For example, you can use this method to find the geometry corresponding to a touch event.