文档

Unity Engine

Unity Engine

QueryParameters

Creates a struct to set up parameters for batch queries: RaycastCommand, BoxcastCommand, CapsulecastCommand, SpherecastCommand.
阅读时间1 分钟最后更新于 13 小时前

Definition

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

hitBackfacesWhether physics queries should hit back-face triangles.
hitMultipleFacesWhether raycast batch query should hit multiple faces.
hitTriggersWhether queries hit Triggers by default.
layerMaskA LayerMask that is used to selectively filter which colliders are considered when casting a ray.

Constructors

Static Properties

Property

Description

DefaultCreate a default QueryParameters struct.