SCNHitTestResult
Information about the result of a scene-space or view-space search for scene elements.
Declaration
class SCNHitTestResultOverview
Hit-testing is the process of finding elements of a scene located at a specified point, or along a specified line segment (or ray). An SCNHitTestResult object provides details about one result from a hit-test search. There are three ways to perform a hit-test search. Use the hitTest(_:options:) method of an SCNView object (or other scene renderer), the hitTestWithSegment(from:to:options:) method of a node, or the rayTestWithSegment(from:to:options:) method of your scene’s physics world.
When you perform a hit-test search, SceneKit looks for SCNGeometry objects along the ray you specify. For each intersection between the ray and and a geometry, SceneKit creates a hit-test result to provide information about both the SCNNode object containing the geometry and the location of the intersection on the geometry’s surface.
Topics
Retrieving Information About a Hit-Test Result
nodegeometryIndexfaceIndexlocalCoordinatesworldCoordinateslocalNormalworldNormalmodelTransformtextureCoordinates(withMappingChannel:)