Version: Unity 6.3 Beta (6000.3)
LanguageEnglish
  • C#

QueryFilter

struct in UnityEngine.LowLevelPhysics2D

/

Implemented in:UnityEngine.Physics2DModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A query filter is used to filter query results known as "hits". For example, you may want a ray-cast representing a projectile to hit players and the static environment but not debris.

Static Properties

Property Description
DefaultCategories The default categories used.
defaultFilter Get the default query filter that hits everything. This uses both QueryFilter.DefaultCategories and QueryFilter.DefaultHitCategories.
DefaultHitCategories The default hit categories used.
Everything Get a query filter that is all categories and hit everything.

Properties

Property Description
categories The categories this query is using. Usually you would only set one bit but multiple are allowed.
hitCategories The categories this query will produce hits with.

Constructors

Constructor Description
PhysicsQuery.QueryFilter Create a default filter set as QueryFilter.defaultFilter.