# QueryParameters

> Creates a struct to set up parameters for batch queries: RaycastCommand, BoxcastCommand, CapsulecastCommand, SpherecastCommand.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.PhysicsModule

```csharp
public struct QueryParameters
```

## Remarks

Use this struct to configure hit flags and layer mask. This supports hit triggers, hit backfaces and hit multiple Mesh faces.

Note: Only RaycastCommand supports hitting multiple Mesh faces.

## Fields

| Value                                                                                               | Description                                                                                                                              |
| --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| [hitBackfaces](/engine/6000.0/script-reference/unityengine/queryparameters/hitbackfaces.md)         | Whether physics queries should hit back-face triangles.                                                                                  |
| [hitMultipleFaces](/engine/6000.0/script-reference/unityengine/queryparameters/hitmultiplefaces.md) | Whether raycast batch query should hit multiple faces.                                                                                   |
| [hitTriggers](/engine/6000.0/script-reference/unityengine/queryparameters/hittriggers.md)           | Whether queries hit Triggers by default.                                                                                                 |
| [layerMask](/engine/6000.0/script-reference/unityengine/queryparameters/layermask.md)               | A [LayerMask](/engine/6000.0/script-reference/unityengine/layermask.md) that is used to selectively ignore Colliders when casting a ray. |

## Constructors

| Constructor                                                                                                                                                            | Description                                                                                                                                                                                                                                                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [QueryParameters(System.Int32,System.Boolean,UnityEngine.QueryTriggerInteraction,System.Boolean)](/engine/6000.0/script-reference/unityengine/queryparameters/ctor.md) | Struct used to set up parameters for queries: [RaycastCommand](/engine/6000.0/script-reference/unityengine/raycastcommand.md), [BoxcastCommand](/engine/6000.0/script-reference/unityengine/boxcastcommand.md), [CapsulecastCommand](/engine/6000.0/script-reference/unityengine/capsulecastcommand.md), [SpherecastCommand](/engine/6000.0/script-reference/unityengine/spherecastcommand.md). |

## Static Properties

| Property                                                                          | Description                              |
| --------------------------------------------------------------------------------- | ---------------------------------------- |
| [Default](/engine/6000.0/script-reference/unityengine/queryparameters/default.md) | Create a default QueryParameters struct. |
