> For the complete documentation index, see [llms.txt](https://traps.runemarkstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://traps.runemarkstudio.com/traps/effect-handlers/ray-handler.md).

# Ray Handler

![This laser beam is controlled by a Ray handler script](/files/-MW597xcBaaBpt__ncaf)

This component controls a [Line renderer](https://docs.unity3d.com/Manual/class-LineRenderer.html) to work as a laser. It uses a [Physics Raycaster](https://docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/script-PhysicsRaycaster.html) to determine if the laser hits something. Resizes the line renderer to match the raycast result.

Note: Rays can be only controlled by a Ray Handler.

* **Play On Awake:** activates the effect on awake.
* **Delay:** how long (in seconds) before the laser becomes visible after activation.
* **Line Renderer:** Line renderer that represents the laser.
* **Spark Particle:** A particle that appears at the end of the laser where it hits something.
* **Max Distance:** How far can the laser extends.
* **Obstacle Layer Mask:** You can ignore certain layers that do not interrupt the laser beam.

![](/files/-MVvGvfp9-Z0DyNfOKsb)
