WorldRaycast
NamespaceNamespace in the Lens Scripting API.
- Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.
Functions
| Function | Description |
|---|---|
| hitTestPlanes | Performs a raycast against native AR-tracked planes from a screen position. The ray starts at the camera's near plane and extends through the camera's far plane at the given screen coordinates. Works on both iOS (ARKit) and Android (ARCore). |
| hitTestWorldMesh | Performs a raycast against world meshes from a screen position. The ray starts at the camera's near plane and extends through the camera's far plane at the given screen coordinates. |
| raycastPlanes | Performs a raycast against native AR-tracked planes along a ray from world position from to world position to. Works on both iOS (ARKit) and Android (ARCore). |
| raycastWorldMesh | Performs a raycast against world meshes along a ray from world position from to world position to. Returns detailed intersection information for each mesh surface hit by the ray. |