Vixen
caa30e12
csharp
public sealed class PhysicsOcclusion

A raycast against the physics world.

Read the guide page for this →

Remarks

⚠ Two bodies have to be got out of the way and they are handled differently. The listener's own body is excluded by the query, because the eye is usually inside its own capsule and a ray that starts inside a convex shape is not reliably outside it. The source's body cannot be excluded — the closest hit being the source is the affirmative answer — so it is compared against instead. Excluding both would report a clear line to something standing behind a wall whose collider the source is inside.

The layer mask is here rather than on SightSettings. Which layers block sight is a fact about the physics world, and a settings record that carried one would be a settings record that cannot be used by OpenSightlines.

Fields and properties (1)

Methods (2)

Used by (1)

  • SightOcclusionTestsVixen.Ai.Perception.Tests