# CastOptions

> Talos 0.7 · Since 0.6

Options for {@link WorldQuery.raycast} and {@link WorldQuery.shapeCast}.

## Signature

```ts
export interface CastOptions {
  /** Whether trigger volumes (`isTrigger` colliders) count as hits. Default true. */
  triggers?: boolean
  /**
   * What the cast passes straight through: an entity (handle or id) or a list. A camera probe that starts
   * at the player's head excludes the player, whose own capsule it would otherwise hit first. An id the
   * scene does not have excludes nothing.
   */
  exclude?: EntityHandle | string | (EntityHandle | string)[]
  /** Every entity carrying one of these tags is passed through as well: a tag or a list. */
  excludeTags?: string | string[]
  /**
   * Hit only colliders on these layers (names from the project's `layers`): a name or a list. The cast
   * passes through everything else. Absent: every layer. The collision matrix (`ignores`) does not apply to
   * a cast; only this option filters one. A name the project does not declare throws `physics.layer-unknown`.
   */
  layers?: string | string[]
}
```

Import: `import type { CastOptions } from "@argus/api"`

## Members

| Member | Signature | Description |
|---|---|---|
| `triggers` | `triggers?: boolean` | Whether trigger volumes (`isTrigger` colliders) count as hits. Default true. |
| `exclude` | `exclude?: EntityHandle \| string \| (EntityHandle \| string)[]` | What the cast passes straight through: an entity (handle or id) or a list. A camera probe that starts at the player's head excludes the player, whose own capsule it would otherwise hit first. An id the scene does not have excludes nothing. |
| `excludeTags` | `excludeTags?: string \| string[]` | Every entity carrying one of these tags is passed through as well: a tag or a list. |
| `layers` | `layers?: string \| string[]` | Hit only colliders on these layers (names from the project's `layers`): a name or a list. The cast passes through everything else. Absent: every layer. The collision matrix (`ignores`) does not apply to a cast; only this option filters one. A name the project does not declare throws `physics.layer-unknown`. |
