文档

Unity Engine

Unity Engine

QueryParameters(int, bool, QueryTriggerInteraction, bool)

Struct used to set up parameters for queries: RaycastCommand, BoxcastCommand, CapsulecastCommand, SpherecastCommand.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Constructor
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule
public QueryParameters(int layerMask = -5, bool hitMultipleFaces = false, QueryTriggerInteraction hitTriggers = QueryTriggerInteraction.UseGlobal, bool hitBackfaces = false)

Parameters

layerMask

A LayerMask that is used to selectively ignore Colliders when casting a ray.

hitMultipleFaces

Whether raycast batch query should hit multiple faces.

Whether queries hit Triggers by default.

hitBackfaces

Whether physics queries should hit back-face triangles.