Table of Contents

Class XRHitTestResult

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The XRHitTestResult interface of the WebXR Device API contains a single result of a hit test. You can get an array of XRHitTestResult objects for a frame by calling GetHitTestResults(XRHitTestSource).
[Value("XRHitTestResult")]
public class XRHitTestResult
Inheritance
XRHitTestResult
Inherited Members

Remarks

Constructors

XRHitTestResult()

public XRHitTestResult()

Methods

CreateAnchor()

NOTE
Experimental
The createAnchor() method of the XRHitTestResult interface creates an XRAnchor from a hit test result that is attached to a real-world object.
[Value("createAnchor")]
public Task<XRAnchor> CreateAnchor()

Returns

Task<XRAnchor>

A {{jsxref("Promise")}} resolving with an XRAnchor object.

Remarks

GetPose(XRSpace)

NOTE
Experimental
The getPose() method of the XRHitTestResult interface returns the XRPose of the hit test result relative to the given base space.
[Value("getPose")]
public XRPose? GetPose(XRSpace baseSpace)

Parameters

baseSpace XRSpace

Returns

XRPose

Returns an XRPose object.

Remarks