Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


useOutsideDepth

Sets the contact filter to filter within the ContactFilter2D.minDepth and ContactFilter2D.maxDepth range, or outside that range.
Read time 1 minuteLast updated 8 days ago

Definition

  • Type: Field
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public bool useOutsideDepth

Remarks

ContactFilter2D.useOutsideDepth uses the range between ContactFilter2D.minDepth and ContactFilter2D.maxDepth to filter depth. Set
useOutsideDepth
to true to only return object depth outside that range. Set
useOutsideDepth
to false to only return object depth within that range. It is false by default.