Limited Availability
WebXR
id: webxr-hit-test
Hit test
The
getHitTestResults() method of an XRFrame object helps place objects in an augmented reality session by finding where cast rays intersect with real-world geometry.
Baseline Status:
This feature is currently Limited and is missing in at least one major browser engine.
Desktop Browser Engine Support
Google Chrome
81
Supported
Mozilla Firefox
—
Unsupported
Apple Safari
—
Unsupported
Microsoft Edge
81
Supported
Mobile Browser Engine Support
Chrome Android
81
Firefox Android
—
Safari iOS
—
Specifications and References
MDN Browser Compat Data Keys:
api.XRFrame.getHitTestResults ↗
api.XRFrame.getHitTestResultsForTransientInput ↗
api.XRHitTestResult ↗
api.XRHitTestResult.getPose ↗
api.XRHitTestSource ↗
api.XRHitTestSource.cancel ↗
api.XRRay ↗
api.XRRay.XRRay ↗
api.XRRay.direction ↗
api.XRRay.matrix ↗
api.XRRay.origin ↗
api.XRSession.requestHitTestSource ↗
api.XRSession.requestHitTestSourceForTransientInput ↗
api.XRTransientInputHitTestResult ↗
api.XRTransientInputHitTestResult.inputSource ↗
api.XRTransientInputHitTestResult.results ↗
api.XRTransientInputHitTestSource ↗
api.XRTransientInputHitTestSource.cancel ↗