Legacy Documentation: Version 5.6 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

ContactFilter2D.minDepth

public float minDepth;

Description

Sets the contact filter to filter the results to only include Collider2D with a Z coordinate (depth) greater than this value.

This is only used if useDepth is true. If the minDepth is set to -Mathf.Infinity or Mathf.Infinity then the lowest possible depth is used.

See Also: Transform.