|  | 
| SceneGetClosestHitObject Method | 
            GetClosestHitObject method executes a hit testing on the SceneNodes in this Scene (or when specified on rootSceneNode and its children) and returns a 
RayHitTestResult object with the closest triangle hit by the specified ray.
            When no triangle is hit, null is returned.
            
 Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.2.9386+3a404a3e1ebfa4efd231da7fe6f10dfb23b95dc4
 Syntax
Syntaxpublic RayHitTestResult? GetClosestHitObject(
	Ray ray,
	SceneNode? rootSceneNode = null,
	HitTestOptions? customHitTestOptions = null
)
Parameters
- ray  Ray
- Ray object that defines the ray that is used for hit testing
- rootSceneNode  SceneNode  (Optional)
- SceneNode where the hit testing begins and continues to SceneNode's children. When not set or null, then DXScene.RootNode is used (optional)
- customHitTestOptions  HitTestOptions  (Optional)
- Optional HitTestOptions that will be used for this hit test. When null (by default), then DefaultHitTestOptions will be used.
Return Value
RayHitTestResultRayHitTestResult with the closest hit object or null if no object was hit
 Remarks
Remarks
            HitTest method executes a hit testing on the SceneNodes in this Scene (or when specified on rootSceneNode and its children) and returns RayHitTestResult object with the closest triangle hit by the specified ray.
            When no triangle is hit, null is returned.
            
            To control advanced hit-testing options set the customHitTestOptions parameter (HitTestOptions) or change the DefaultHitTestOptions that is used when customHitTestOptions parameter is not set (null by default).
            
            To get all hit results, use the GetAllHitObjects method.
            
 See Also
See Also