Note: This documentation is for the old 0.2.0 version of A-Frame. Check out the documentation for the current 1.2.0 version
The raycaster component provides for an entity the ability to do intersection testing with a raycaster. The raycaster component is a helper component. By itself, it does not do anything, but it can be and is used by components such as the cursor component. The raycaster component will poll for intersections with other entities and set
this.intersectedEl to the closest intersected entity.
|intersectedEl||The entity currently intersecting the raycaster.|
|raycaster||three.js raycaster object.|
|intersection||Raycaster intersecting with an entity.|
|intersectioncleared||Raycaster no longer intersecting with an entity.|
To use the raycaster, we can specify the raycaster component as a dependency of another component.