Platforms to show: All Mac Windows Linux Cross-Platform

SCNHitTestResultMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Function: Information about the result of a scene-space or view-space search for scene elements.
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 method of an SCNViewMBS object (or other scene renderer), the hitTestWithSegment method of a node, or the rayTestWithSegment method of your scene’s physics world.

When you perform a hit-test search, SceneKit looks for SCNGeometryMBS 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 SCNNodeMBS object containing the geometry and the location of the intersection on the geometry’s surface.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Hit Test Search Modes

Constant Value Description
SCNHitTestSearchModeAll 1 The hit test should return all possible results, sorted from nearest to farthest.
SCNHitTestSearchModeAny 2 The hit test should return only the first object found, regardless of distance.
SCNHitTestSearchModeClosest 0 The hit test should return only the closes object found.

This class has no sub classes.

Some methods using this class:

Some examples using this class:

Blog Entries


The items on this page are in the following plugins: MBS Mac64bit Plugin.

SCNGeometryTessellatorMBS   -   SCNIKConstraintMBS

💬 Ask a question or report a problem
The biggest plugin in space...

Start Chat