Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


QueryParameters(int, bool, QueryTriggerInteraction, bool)

Struct used to set up parameters for queries: RaycastCommand, BoxcastCommand, CapsulecastCommand, SpherecastCommand.
Read time 1 minuteLast updated 4 days ago

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 filter which colliders are considered 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.