# Raycast Triggers

![](/files/-MW9SIioiRbFOet4ekI-)

Use this trigger type for detector rays. Note that this is a trigger behavior only, for visualizing the laser beam you need a Ray Handler too.&#x20;

* **Trap:** the trap this detector ray controls.&#x20;
* **Action:** Activate, Deactivate or Toggle. (For Toggle you always need to specify a trap)
* **Cooldown:** time (seconds) until the trigger can react to events again.
* **Max Distance:** how far the ray (laser) should extend.&#x20;
* **Layer Mask:** use these to include or exclude objects from raycasting.
* **Tag Filter:** the trigger reacts when the raycast hits a game object with these tags.
* **Events:** you can set Unity Functions on specific events, for example, play audio, particle effect, or animation.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://traps.runemarkstudio.com/traps/raycast-triggers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
