Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IsFilteringNormalAngle

Checks if the angle of normal is within the normal angle range to be filtered.
Read time 2 minutesLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule

IsFilteringNormalAngle(Vector2)

Checks if the angle of
normal
is within the normal angle range to be filtered.
public bool IsFilteringNormalAngle(Vector2 normal)

Parameters

normal

The normal used to calculate an angle.

Returns

Type

Description

boolReturns true when
normal
is excluded by the filter and false if otherwise.

Remarks

Filtering is defined as including or excluding objects based upon a specific condition. Normal angle filtering checks an angle and includes it when it is within the normal angle range and excludes it if otherwise. IsFilteringNormalAngle returns true when _useNormalAngle is set to true and the angle is outside the normal angle range defined by _minNormalAngle and _maxNormalAngle. This indicates the angle is filtered which means it should be excluded. IsFilteringNormalAngle returns false if otherwise. Note:: Setting _useOutsideNormalAngle to true inverts the function behavior and it returns opposite results.
Additional Resources: _useNormalAngle, _maxNormalAngle

IsFilteringNormalAngle(float)

Checks if the
angle
is within the normal angle range to be filtered.
public bool IsFilteringNormalAngle(float angle)

Parameters

angle

The angle used for comparison in the filter.

Returns

Type

Description

boolReturns true when
angle
is excluded by the filter and false if otherwise.

Remarks

Filtering is defined as including or excluding objects based upon a specific condition. Normal angle filtering checks an angle and includes it when it is within the normal angle range and excludes it if otherwise. IsFilteringNormalAngle returns true when _useNormalAngle is set to true and the angle is outside the normal angle range defined by _minNormalAngle and _maxNormalAngle. This indicates the angle is filtered which means it should be excluded. IsFilteringNormalAngle returns false if otherwise. Note:: Setting _useOutsideNormalAngle to true inverts the function behavior and it returns opposite results.
Additional Resources: _useNormalAngle, _maxNormalAngle